unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Alex Branham <alex.branham@gmail.com>, Paul Eggert <eggert@cs.ucla.edu>
Cc: "Basil L. Contovounesios" <contovob@tcd.ie>,
	Michael Albinus <michael.albinus@gmx.d>,
	Emacs development discussions <emacs-devel@gnu.org>
Subject: RE: removing flatten-list (alias for new flatten-tree function)
Date: Mon, 17 Dec 2018 12:23:30 -0800 (PST)	[thread overview]
Message-ID: <d1612c4b-8eb9-4f84-b115-6f5fc4c99adc@default> (raw)
In-Reply-To: <87lg4oq8q8.fsf@gmail.com>

> > 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	other threads:[~2018-12-17 20:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17 18:40 removing flatten-list (alias for new flatten-tree function) Paul Eggert
2018-12-17 19:00 ` Alex Branham
2018-12-17 20:23   ` Drew Adams [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d1612c4b-8eb9-4f84-b115-6f5fc4c99adc@default \
    --to=drew.adams@oracle.com \
    --cc=alex.branham@gmail.com \
    --cc=contovob@tcd.ie \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.d \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).