help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: [External] : Closures - do you understand them well?


From: Michael Heerdegen
Subject: Re: [External] : Closures - do you understand them well?
Date: Thu, 08 Dec 2022 18:30:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Drew Adams <drew.adams@oracle.com> writes:

> Just a mention for others, that '() == ().
> No need to quote t or nil (including its
> alter ego ()).

You are lucky that your remark doesn't fulfill the "you better write
this as ... and then it returns ..." answer property because it doesn't
change the return value ;-)

But yes, like explicitly specifying a nil binding (X nil) instead of (X)
this is bout readability and personal preferences.  (X '()) is my
hint to the reader that X will be used as a list type accumulator in the
BODY.  I prefer that over (X ()), (X nil) and (X).  It's a stylistic
habit.

Why?  Because I want to make clear that the variable is initialized with
an empty list, compared to what the evaluation of an empty list aka nil
returns (which accidentally happens to be the same again in Lisp).

Thanks for mentioning this point Drew,

Michael.




reply via email to

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