[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: Phillip Lord
Subject: Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal
Date: Fri, 23 Jan 2015 10:34:49 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> That's a problem with any lisp that provides a reader-macro facility.
>> The onus is on the authors of macro packages to create macros that work
>> well with the existing emacs-lisp-mode parser.
> That's a good point.
>>>> So I'm currently against addition of CL style reader macros.
>> Stefan, is emacs-lisp-mode support your only objection?
> Yes and no.  No in the sense that I expect that introducing such reader
> macros will have consequences that go further than just "emacs-lisp-mode
> support".
> 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?
This would be faster. It means that changes to reader-macro-alist
wouldn't be reflected in code till it was re-evaled.

My main concern with this as a proposal is that <letter> is a fairly
small namespace. There is a lot of possibility for pretty disasterous
clashes if this gets used in the wild.


reply via email to

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