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: [PATCH] Clojure-like syntactic sugar for an anonymous function literal Date: Fri, 23 Jan 2015 15:52:09 -0500 Message-ID: References: <54C15ECA.5050008@dancol.org> <87egqlvl86.fsf@newcastle.ac.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422046368 1464 80.91.229.3 (23 Jan 2015 20:52:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Jan 2015 20:52:48 +0000 (UTC) Cc: Daniel Colascione , Oleh , emacs-devel@gnu.org To: phillip.lord@newcastle.ac.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 23 21:52:48 2015 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 1YElDe-0003D6-RM for ged-emacs-devel@m.gmane.org; Fri, 23 Jan 2015 21:52:42 +0100 Original-Received: from localhost ([::1]:33086 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YElDe-0002Xf-9N for ged-emacs-devel@m.gmane.org; Fri, 23 Jan 2015 15:52:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YElDa-0002Xa-VP for emacs-devel@gnu.org; Fri, 23 Jan 2015 15:52:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YElDW-0006nG-0A for emacs-devel@gnu.org; Fri, 23 Jan 2015 15:52:38 -0500 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]:46260) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YElDV-0006n5-SL for emacs-devel@gnu.org; Fri, 23 Jan 2015 15:52:33 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id E2ACB8511B; Fri, 23 Jan 2015 15:52:32 -0500 (EST) Original-Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id CD2CE1E5B8B; Fri, 23 Jan 2015 15:52:09 -0500 (EST) Original-Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848) id ACA25B4102; Fri, 23 Jan 2015 15:52:09 -0500 (EST) In-Reply-To: (Stefan Monnier's message of "Fri, 23 Jan 2015 15:24:45 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82, MC_TSTLAST 0.00) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 132.204.24.67 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:181697 Archived-At: >>> Maybe we could introduce a more limited form of reader macros. >>> E.g. allow # and make the reader return >>> (funcall (cdr (assq reader-macro-alist)) ) >> Would it not be possible to have the reader return a macro which could >> do the cdr and assq at compile time and obviate the need for funcall? > I like that. Because it solves the main problem I had with my proposal, > which was to make `read' into something whose safety depends on > "somewhat arbitrary Elisp code". Actually, no I think this is not good. The problem is that it means such reader macros are just plain normal macros, i.e. they're only expanded when they're in an "evaluated expression" position. So you wouldn't be able to use them within a quoted list, for example. Stefan