[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33309: Add flatten-list?
From: |
Alex Branham |
Subject: |
bug#33309: Add flatten-list? |
Date: |
Wed, 07 Nov 2018 15:19:59 -0600 |
User-agent: |
mu4e 1.1.0; emacs 27.0.50 |
On Wed 07 Nov 2018 at 14:36, Drew Adams <drew.adams@oracle.com> wrote:
> FWIW, I don't think Emacs Lisp needs a flatten
> function.
>
> 1. Even Common Lisp doesn't bother with one.
> (And there are lots of Common Lisp
> functions I'd sooner see added to Emacs.)
>
> 2. It's trivial to define when needed, and
> there are not a lot of existing uses of it.
Like I said, there's at least four implementations in Emacs of the same
thing, and who knows how many in 3rd-party packages in ELPA or
elsewhere. I'm not sure what you consider "a lot," but DRY kicks in
around three times for me.
> 3. The functions you mention do not all behave
> the same. Even their arg lists are not the
> same. (But sure, they could all be made to
> use a common version, if that were important.)
>
> 4. (flatten-list 42) => (42)
>
> The doc string says nothing about the case
> where the argument LIST (a bad name here)
> is not a list. And if the arg need not be
> a list then "-list" in the function name
> is not good.
Right, I didn't mean to imply that the one I sent be added in its
current state. I just meant to kick off discussion. I basically
copy/pasted it from somewhere (lpr, I think?). If added it'll need to be
properly documented and perhaps message-flatten-list and the others made
obsolete aliases.
Thanks,
Alex
signature.asc
Description: PGP signature