emacs-devel
[Top][All Lists]
Advanced

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

RE: removing flatten-list (alias for new flatten-tree function)


From: Drew Adams
Subject: RE: removing flatten-list (alias for new flatten-tree function)
Date: Mon, 17 Dec 2018 12:23:30 -0800 (PST)

> > While doing that I found that I was confused by the existence of the
> > just-added alias 'flatten-list', and I propose removing it as per the
> > attached patch. I think people who want to find and use the new
> > 'flatten-tree' function will typically be better served if it has
> > just one name that fits in with existing Emacs Lisp functions like
> > 'copy-tree', as opposed to also having a name that is a misnomer.
> 
> The reason I included `flatten-list' was that the existing
> implementations (both inside and outside of Emacs) were nearly all
> called foo-flatten-list or similar. I thought it would perhaps be
> easier for people to find `flatten-list' than `flatten-tree'. I
> don't have a really strong opinion about this, though.

Yes.  I don't know whether an alias is needed, but this
should be pointed out in the doc, because Elisp is part
of the history of Lisp.  Flattening a (Lisp) list has
pretty much always meant flattening it throughout. 

If you want to use an alias that mentions "list", consider
`deep-flatten-list'.

"Deep" usually conveys recursively performing some action
at all levels.  And it's understood by most developers,
using most languages.



reply via email to

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