From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: 24.3.50; Use of deprecated ((lambda ...) ...) form Date: Sat, 10 Nov 2012 16:16:09 +0900 Message-ID: <87y5iaszba.fsf@uwakimon.sk.tsukuba.ac.jp> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1352531784 11461 80.91.229.3 (10 Nov 2012 07:16:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 Nov 2012 07:16:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: Barry OReilly Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 10 08:16:34 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TX5Iw-0003zE-60 for ged-emacs-devel@m.gmane.org; Sat, 10 Nov 2012 08:16:34 +0100 Original-Received: from localhost ([::1]:36019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TX5Im-0007IQ-RN for ged-emacs-devel@m.gmane.org; Sat, 10 Nov 2012 02:16:24 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TX5Ij-0007IL-19 for emacs-devel@gnu.org; Sat, 10 Nov 2012 02:16:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TX5If-0003J3-V4 for emacs-devel@gnu.org; Sat, 10 Nov 2012 02:16:20 -0500 Original-Received: from mgmt2.sk.tsukuba.ac.jp ([130.158.97.224]:43435) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TX5If-0003Ig-Li for emacs-devel@gnu.org; Sat, 10 Nov 2012 02:16:17 -0500 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt2.sk.tsukuba.ac.jp (Postfix) with ESMTP id BAA879708FC; Sat, 10 Nov 2012 16:16:09 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 8117B1A281F; Sat, 10 Nov 2012 16:16:09 +0900 (JST) In-Reply-To: X-Mailer: VM undefined under 21.5 (beta32) "habanero" b0d40183ac79 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 130.158.97.224 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:154783 Archived-At: 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.