emacs-devel
[Top][All Lists]
Advanced

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

RE: sequence manipulation functions


From: Drew Adams
Subject: RE: sequence manipulation functions
Date: Wed, 5 Nov 2014 10:27:56 -0800 (PST)

>> No.  Emacs should follow Common Lisp in this regard.
>> http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node141.html
>> #SECTION001800000000000000000
>
> Could we at least add the `seq-' variants as aliases?
> It would greatly improve discoverability.

Don't ask me what we "could" do.  I don't decide anything.

My own opinion would be not to do that.

If you are really worried about discoverability, then an alias
that speaks to what the function really *does* is more important
than an alias that calls out the main argument type.

`reduce' etc. are meaningful names to anyone used to functional
programming with higher-order functions, but they are not names
that help discoverability for someone not used to that.

Not to mention that the doc string for `reduce' here is not
helpful.  It just reuses the verb "reduce", without describing
anything.  Contrast the Common Lisp one-line description:

 "uses a binary operation, FUNCTION, to combine the elements of
  sequence bounded by START and END."
 (http://clhs.lisp.se/Body/f_reduce.htm)

(Yes, a one-liner is not going to make things crystal clear,
in any case.)

---

And again, we should, IMO, not introduce things like `some-p',
which overlap with `cl-some' in functionality.  Just have one
such function (for each such proposed conflict), and preferably
have it follow Common Lisp's lead.



reply via email to

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