[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dash.el [was: Re: Imports / inclusion of s.el into Emacs]

From: Joost Kremers
Subject: dash.el [was: Re: Imports / inclusion of s.el into Emacs]
Date: Fri, 08 May 2020 10:16:18 +0200
User-agent: mu4e 1.4.4; emacs 26.3

On Fri, May 08 2020, Alfred M. Szmidt wrote:
> My guess: he doesn't know dash.el Neither do I, I looked it up.
The manual for dash.el doesn't explain what dash.el is about, it
advertises it self as a 'modern list library for Emacs'.

From the looks it contains a big mix of various functions that operate
on lists, anaphoric variants of Emacs lisp ones, some functions
borrowed from Haskell, some functions to work on tree, and a thin layer for various Emacs Lisp functions to follow the dash.el libraries internal naming converntion of prefixing everything with a dash, and the Scheme naming style for predicate. At the end, I still do not know what dash.el does,

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.

I assume the short prefix was chosen because list handling functions are part of the core language in Clojure (and I assume other functional programming languages) and using a dash was the best way to not conflict with existing names and still create the feeling that you're not actually using a library. (I assume "easier to type" won't have much to do with it, we have completion, after all.)

The convention of using `?` for predicates is probably also borrowed more from Clojure than from Scheme (though Clojure obviously borrowed it from Scheme).

or what to use it for.

Well, you use it if you want to program in a Clojure-like style.

Joost Kremers
Life has its moments

reply via email to

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