emacs-devel
[Top][All Lists]
Advanced

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

Re: Including some functions from dash.el in Emacs?


From: Nicolas Petton
Subject: Re: Including some functions from dash.el in Emacs?
Date: Wed, 29 Oct 2014 14:16:26 +0100
User-agent: mu4e 0.9.9.6pre3; emacs 24.3.1

Stefan Monnier <address@hidden> writes:

>> think it would be great if Elisp had them builtin, like `flatten`,
>> `filter` or `reduce`.
>
> IIUC, `filter' is covered by `cl-remove-if`, and `reduce' is called
> `cl-reduce', right?

Indeed, but I thought that having it builtin (ie no cl-lib
required) would make Elisp better. Maybe that's just me but I always see
cl-lib as a compatibility layer for CL, not something that I should
almost always load in order to have decent manipulation list functions.

Cheers,
Nico

>
> As for `flatten', all the examples I've seen where it's used have been
> either cases where I think that using a different structure would have
> made simpler&clearer code (and removed the need for `flatten'), or where
> you really really got lucky.
>
> If you think about types, flatten can't make sense for lists (since
> lists are typically "lists of <something>" but not "list of list of list
> of list of list ..."), so it is only really useful for trees where it
> gives you the in-order elements of the tree, so it only works for trees
> with no extra meta info.  In those tree cases, I believe that
> a tree-traversal-iterator would be more useful.
>
>> Would it make sense to include some of the dash.el functions into Emacs?
>
> I'm in the process of trying to get dash.el included in GNU ELPA.
> I haven't decided yet whether or when it should go into Emacs or stay
> in GNU ELPA.
>
>
>         Stefan

-- 
Nicolas Petton
http://nicolas-petton.fr




reply via email to

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