[Top][All Lists]

[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: Phillip Lord
Subject: Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs]
Date: Fri, 08 May 2020 18:53:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.90 (gnu/linux)

address@hidden (Alfred M. Szmidt) writes:

>    But you just described what dash does. ;-) It is just a collection 
>    of list-handling functions such as they exist in modern functional 
>    programming languages. If you're used to thinking in this paradigm 
>    and then come (back) to Emacs Lisp, it feels like a hopelessly 
>    clunky language. `dash.el` was written to remedy this.
> Thank you, I was and still am unsure what the purpose of dash.el is!
> It is simply not somehing I would ever find myself using.
> While I'm very much used to programming in functional langugaes, the
> way that Clojure and Haskell do it is very much alien to me.  And
> quite often, confusing to follow and reason about (IMHO).
> While some might prefer that, they do not seem well fitting for Emacs,
> how you program in Emacs Lisp and how Emacs Lisp is intended to be
> used.

Personally, I find dash very comfortable to use, because I can stop
thinking about loops, and think more about expressions. Of course, the
addition of seq.el a couple of years back has bought that to. pcase.el
has provided some of the other things in dash (as well as more). Indeed,
I wrote my own library, so I could stop thinking about loops when
manipulating buffer contents. An dash.el anaphoric macros are nice also,
and save typing `lambda' a lot.

Finally, dash just adds a lot of things ready rolled. If the history of
programming languages tells us anything at all, it is that languages
tend toward higher and higher levels. Emacs could do with more of this.


(while (re-search-forward "foo[ \t]+bar" nil t)
   (replace-match "foobar"))

from the documentation. And, if you want to not nobble the user facing
location of point

  (while (re-search-forward "foo[ \t]+bar" nil t)
    (replace-match "foobar")))

And, don't forget to beware what you are searching for and what you are
replacing. Because if point does not advance, you'll loop for ever.

I don't want to have to remember all of this.

>    > or what to use it for.
>    Well, you use it if you want to program in a Clojure-like style.
> Isn't that the crux then? 
> I as a user want to program in an Emacs Lisp style, not Clojure-style.

Emacs lisp is not a constant, of course. One of the joys of lisp having
very little syntax it is possible to re-invent for different
generations. Many people do find 

> As a user, I found many of the functions to have alien names, strange
> behaviour and very unintuitve to use in the style that is Emacs lisp
> (Classical Lisp?).  But some functions seem useful, though with
> non-Emacsy names and calling conventions.

Yes, this is true. seq.el does a better job there. But, again, it
assumes we cannot re-invent Emacs. The question is whether we
should. 2million downloads for dash.el tells me many users think the
answer is yes.


reply via email to

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