emacs-devel
[Top][All Lists]
Advanced

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

RE: seq-some-p and nil


From: Drew Adams
Subject: RE: seq-some-p and nil
Date: Thu, 3 Sep 2015 10:50:28 -0700 (PDT)

> I think `seq-some-p' (or its successor) would also be more useful if it
> promised to return the first matching element (the docstring says "any
> element", though in practice it does return the first).

Yes, like Common Lisp `some'.

And IMHO, it is better to reserve the suffix `-p' for a function
that does not return an especially useful result, i.e., that
really is used mainly or only as a predicate.

If `seq-some-p' returns a sequence element then it should be
called `seq-some', without the `-p'.

The fact that some functions that return useful non-nil results
other than `t' can be used also as predicates does not mean
that they should systematically be named with suffix `-p'.

That suffix draws attention to the use as a predicate.  A case
such as `some-p' should not do that.  Its name should say that
it returns a sequence element.



reply via email to

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