[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs]
From: |
Stefan Monnier |
Subject: |
Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs] |
Date: |
Mon, 18 May 2020 16:19:48 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> I understand your argument, particularly as it applies to the
> reader syntax. On the other hand, dollar.el is just a macro: it
> does not complicate the syntax (for some definition of syntax);
> although it does complicate understanding when first presented.
Don't get me wrong: if I were to design Elisp from scratch, I'd most
probably choose a syntax for functions which has a handy "no explicit
parameter names" shorthand like `#(f % 1)` and also naturally
generalizes to the "fully explicit parameter names".
But I can't see a way to get a "shorthand" syntax sufficiently close to
the existing "longhand" syntax for this to work well. I guess we could
try to do "the opposite" of what you do, and support
(lambda [f $1 5])
which `prettify-symbols-mode` displays as
(λ [f $1 5])
But even there, I'm not sure the benefit is worth the added complexity
for the occasional user trying to make sense of a few Elisp snippets.
> Would prettifying lambda to λ lead to visually unexpected indentation?
It does, occasionally, yes, as in:
(lambda (x) (+ x
5))
vs
(λ (x) (+ x
5))
I know because I use `prettify-symbols-mode` ;-)
Stefan
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], (continued)
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Phillip Lord, 2020/05/12
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Stefan Monnier, 2020/05/12
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Jonas Bernoulli, 2020/05/13
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Adrián Medraño Calvo, 2020/05/14
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Göktuğ Kayaalp, 2020/05/14
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Richard Stallman, 2020/05/14
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Phillip Lord, 2020/05/15
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Richard Stallman, 2020/05/17
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Stefan Monnier, 2020/05/18
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Adrián Medraño Calvo, 2020/05/18
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs],
Stefan Monnier <=
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Lars Ingebrigtsen, 2020/05/19
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Bastien, 2020/05/22
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Joost Kremers, 2020/05/18
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Richard Stallman, 2020/05/19
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Göktuğ Kayaalp, 2020/05/18
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Stefan Monnier, 2020/05/18
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], tomas, 2020/05/19
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Göktuğ Kayaalp, 2020/05/19
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Stefan Monnier, 2020/05/19
- Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs], Göktuğ Kayaalp, 2020/05/20