[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: |
Thu, 22 Jan 2015 18:36:29 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> 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>)
So it would allow introducing a special regexp syntax #r"regexp" (which
would for example swap the meaning of ( and \( and things like that),
but it wouldn't allow defining "raw string" (backslashes would quote the
" just as usual).
> We already have plenty of libraries defining "control flow" structures;
> look at all the anaphoric-if libraries out there.
Agreed, and I think it's a good thing.
Stefan
- Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, (continued)
- Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, Artur Malabarba, 2015/01/22
- Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, Phillip Lord, 2015/01/22
- Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, Daniel Colascione, 2015/01/22
- Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, Oleh, 2015/01/22
- Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, Richard Stallman, 2015/01/22
- Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, David Kastrup, 2015/01/23
- Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, Eli Zaretskii, 2015/01/23
Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, Stefan Monnier, 2015/01/22
- Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, Oleh, 2015/01/22
- Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, Daniel Colascione, 2015/01/22
- Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal,
Stefan Monnier <=
- Reader macros (Was: Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal), Daniel Colascione, 2015/01/22
- Re: Reader macros, David Kastrup, 2015/01/23
- Re: Reader macros, Daniel Colascione, 2015/01/23
- Re: Reader macros, David Kastrup, 2015/01/23
Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, Phillip Lord, 2015/01/23
Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, Oleh, 2015/01/23
Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, Phillip Lord, 2015/01/23
Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, Daniel Colascione, 2015/01/23
Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, Daniel Colascione, 2015/01/23
Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal, Phillip Lord, 2015/01/23