emacs-devel
[Top][All Lists]
Advanced

[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 00:42:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> However, we could implement both syntaxes, use the $ syntax in the
> short term, and convert external packages to the # syntax in a few
> years.
>
> Let's see what Eli thinks about it.

FWIW, I'm not too fond of such shorthand syntax.  The benefit is not
very high and it makes the language that much more difficult to learn
for newcomers.

For a programming language like Closure, it might make sense, since
most/all people writing Closure programs are actual programmers that
have to be proficient in Clojure.  But Elisp lambdas are very common in
.emacs files, so this additional complexity will be exposed to some of
our users who aren't programmers or aren't proficient in Elisp.

[ Yes, I know it may sound strange coming from me, since I'm to blame
  for a lot of complexity in Elisp :-(
  But to my defense, `pcase` and `cl-defmethod` aren't nearly as often
  needed in .emacs as lambdas.  ]

I can already see the discussions in forums about "what's the difference
between #(f % 1) and (lambda (x) (f x 1))", "when should I use which",
...

If we want to shorten anonymous functions we could start with something
like (λ (x) (f x 1)), which you can get with
prettify-symbols-mode already.


        Stefan




reply via email to

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