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: Oleh
Subject: Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal
Date: Thu, 22 Jan 2015 09:04:30 +0100

Hi Stephen,

>  > >
>  > > This is my first attempt of modifying the C source of Emacs.
>  > > The goal is to add a new reader syntax:
>  > >
>  > >     #(foo bar) should translate to (short-lambda (foo bar))
>  >
>  > Thanks, but I'd strongly prefer not to baking this syntax into the elisp
>  > reader.
>
> XEmacs is -1 on this change for the same reasons Daniel gives.
>
> I also don't like it because the convention is to use "#c" (where c is
> some character) for new syntax (eg, XEmacs uses #r"" for "rawstring
> syntax", where the benefit is huge because of the unreadability of
> regexps in ordinary strings).

Note that it only takes the "#([^\"]" spot. The "#c" convention is
completely untouched, unless "c" is "(".

Of course, I'm open to other variants, if this isn't accepted, maybe
"#l(foo bar)". The initial suggestion would be immediately familiar to
any Clojure programmer. Clojure is a bit more popular than Elisp,
judging by 8000 vs 3000 questions on Stack Overflow, and 25,000 vs
22,000 repositories on Github.

I'm also open to trying my hand at the "CL-style reader-macro
facility".  But this task would be much more complex than the simple
hack that I'm presenting here. So I really want to make sure that this
feature is wanted and will be accepted before I spend time on it.



reply via email to

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