emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Clojure-like syntactic sugar for an anonymous function liter


From: Stefan Monnier
Subject: Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal
Date: Fri, 23 Jan 2015 15:24:45 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> Maybe we could introduce a more limited form of reader macros.
>> E.g. allow #<letter><sexp> and make the reader return
>> (funcall (cdr (assq <letter> reader-macro-alist)) <sexp>)
> 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".

> My main concern with this as a proposal is that <letter> is a fairly
> small namespace.

Well, "letter" could easily be extended to "identifer".  But of course,
there'd be a lot of pressure on the single-letter identifiers anyway.


        Stefan



reply via email to

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