[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Resolved: ! often means may, not will [WAS: Re: take! 0==1?]

From: Jan Nieuwenhuizen
Subject: Resolved: ! often means may, not will [WAS: Re: take! 0==1?]
Date: Fri, 12 Jul 2013 18:57:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

William ML Leslie writes:

> Actually, I should clarify a few things, but this discussion probably
> belongs on guile-user.

I realise that now, reading below...

> Whenever the documentation says 'may', it really means it.  You
> absolutely cannot rely on the side-effecting behaviour, because an
> implementation that does no mutation whatsoever is a valid
> implementation of (take!), according to the documentation.  All you're
> saying by using (take!) is, if it is more efficient to do so by
> altering the list, then please do.

Thank you for this clue-bat.

Wow, I never realised that !/_x is only a performance/ugliness thingy,
except when used with set!.  I somehow assumed `!' meant: will alter
in-place.  My bad.

Is there really a good reason for exposing such performance
considerations to the user; can't the compiler [often] tell whether it's
safe to modify in place?

Greetings, Jan

Jan Nieuwenhuizen <address@hidden> | GNU LilyPond
Freelance IT | AvatarĀ®  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]