[Top][All Lists]

[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:52:09 -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".

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.


reply via email to

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