From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Barry OReilly <gundaetiapo@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: 24.3.50; Use of deprecated ((lambda ...) ...) form
Date: Sat, 10 Nov 2012 16:16:09 +0900 [thread overview]
Message-ID: <87y5iaszba.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <CAFM41H3gOK1LAyEwJ2OdLsnccYN8Vx-3oqYiBxhw46xvi8ucKg@mail.gmail.com>
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
functionp.
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.
next prev parent reply other threads:[~2012-11-10 7:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-10 0:05 24.3.50; Use of deprecated ((lambda ...) ...) form Barry OReilly
2012-11-10 1:59 ` Stefan Monnier
2012-11-10 7:16 ` Stephen J. Turnbull [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-11-09 14:12 Sam Steingold
2012-11-09 15:59 ` Stefan Monnier
2012-11-09 16:15 ` Paul Eggert
2012-11-09 16:38 ` Sam Steingold
2012-11-09 17:05 ` Glenn Morris
2012-11-09 19:22 ` Sam Steingold
2012-11-09 16:50 ` Drew Adams
2012-11-09 17:54 ` Stefan Monnier
2012-11-09 19:43 ` Sam Steingold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y5iaszba.fsf@uwakimon.sk.tsukuba.ac.jp \
--to=stephen@xemacs.org \
--cc=emacs-devel@gnu.org \
--cc=gundaetiapo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.