From: Nicolas Petton <petton.nicolas@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: Including some functions from dash.el in Emacs?
Date: Wed, 29 Oct 2014 14:16:26 +0100 [thread overview]
Message-ID: <87ppdb6mol.fsf@gmail.com> (raw)
In-Reply-To: <jwvd29b9hjg.fsf-monnier+emacs@gnu.org>
Stefan Monnier <monnier@iro.umontreal.ca> 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
next prev parent reply other threads:[~2014-10-29 13:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 7:25 Including some functions from dash.el in Emacs? Nicolas Petton
2014-10-29 12:50 ` Stefan Monnier
2014-10-29 13:04 ` Rasmus
2014-10-29 13:16 ` Nicolas Petton [this message]
2014-10-29 14:06 ` Stefan Monnier
2014-10-29 14:52 ` Nicolas Petton
2014-10-29 16:35 ` Stefan Monnier
2014-10-30 9:24 ` Nicolas Petton
2014-10-30 13:41 ` Stefan Monnier
2014-10-29 14:09 ` raman
2014-10-29 16:36 ` Stefan Monnier
2014-10-30 14:38 ` raman
2014-10-30 15:48 ` Compiling non-Elisp files in ELPA packages (was: Including some functions from dash.el in Emacs?) Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ppdb6mol.fsf@gmail.com \
--to=petton.nicolas@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.