[Top][All Lists]

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

Re: 24.3.50; Use of deprecated ((lambda ...) ...) form

From: Stephen J. Turnbull
Subject: Re: 24.3.50; Use of deprecated ((lambda ...) ...) form
Date: Sat, 10 Nov 2012 16:16:09 +0900

Barry OReilly writes:
 > >> > why is ((lambda...)...) deprecated?
 > Is it because of this kind of inconsistency?
 > (funcall (lambda () (message "hi")))         ; Prints "hi"
 > (funcall (progn (lambda () (message "hi")))) ; Prints "hi"
 > ((lambda () (message "hi")))                 ; Prints "hi"
 > ((progn (lambda () (message "hi"))))         ; Lisp error:
 > (invalid-function (progn (lambda nil (message "hi"))))
 > One would hope either that the last two both work or both not work.

Where do you see an inconsistency?  A lambda expression is both
functionp and self-evaluating.  A progn is neither.  The first two
work because funcall evaluates its arguments, and they both evaluate
to a lambda expression.  The third works because a lambda expression
is functionp.  The fourth fails because a progn expression is not

OIC, you think Emacs Lisp should be a Lisp-1.  I tend to agree, but it
ain't.  Sorry! :-)

I think Stefan misspoke when he said "if you want to bind locals, you
know where to find `let'."  I think what he really meant "if you want
code to look like Brainf!ck, you know where to find that language."

That is to say, as a matter of style for coding Emacs, I agree, such
expressions should be deprecated, as they are just a way for
old-timers and young pedants to show off.  On the other hand, they
express a deep truth about Lisp, and I would be saddened (and refuse
to follow suit where I actually have a say in the matter) if this
idiom were seriously deprecated in user code.

reply via email to

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