From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: emacs lisp syntax rfc: (cond (EXPR => (lambda (X) ...))) Date: Sun, 02 Jan 2011 21:19:44 -0500 Message-ID: References: <877hengesr.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1294021238 27779 80.91.229.12 (3 Jan 2011 02:20:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 Jan 2011 02:20:38 +0000 (UTC) Cc: emacs-devel@gnu.org To: Thien-Thi Nguyen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 03 03:20:34 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PZa1k-00008i-Lm for ged-emacs-devel@m.gmane.org; Mon, 03 Jan 2011 03:20:31 +0100 Original-Received: from localhost ([127.0.0.1]:39535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZa1Z-0004nt-2x for ged-emacs-devel@m.gmane.org; Sun, 02 Jan 2011 21:19:53 -0500 Original-Received: from [140.186.70.92] (port=38240 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZa1T-0004nU-D5 for emacs-devel@gnu.org; Sun, 02 Jan 2011 21:19:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZa1S-0003ys-Ba for emacs-devel@gnu.org; Sun, 02 Jan 2011 21:19:47 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:29125 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZa1S-0003yk-5o for emacs-devel@gnu.org; Sun, 02 Jan 2011 21:19:46 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAOLAIE1Ld/TY/2dsb2JhbACDdqA9dKxpjUOBIIM2dASEZY4b X-IronPort-AV: E=Sophos;i="4.60,265,1291611600"; d="scan'208";a="86922020" Original-Received: from 75-119-244-216.dsl.teksavvy.com (HELO ceviche.home) ([75.119.244.216]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 02 Jan 2011 21:19:44 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 5F1C96610E; Sun, 2 Jan 2011 21:19:44 -0500 (EST) In-Reply-To: <877hengesr.fsf@ambire.localdomain> (Thien-Thi Nguyen's message of "Sun, 02 Jan 2011 22:45:56 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134184 Archived-At: > In Scheme, the expression: > (cond (EXPR =3D> (lambda (X) ...))) > provides the lambda expression parameter X with the non-false > value computed from evaluating EXPR. However, if EXPR evaluates > to false, control falls through to the next =E2=80=98cond=E2=80=99 clause= , as > usual. The syntax requires the symbol =E2=80=98=3D>=E2=80=99 between EXP= R and the > lambda expression, without which the non-false value is discarded > (i.e., the status quo). > What do people think of adding this to Emacs Lisp? (I would be > grateful for pointers to any previous discussion on the matter.) Doesn't sound bad: it's a conservative extension which doesn't seem to introduce any significant incompatibility. The only problem I can see with it is that it relies on a function call, which is a slow operation in the current Elisp implementation. Stefan