* bug#44330: 26.3; doc string of `cl-some'
@ 2020-10-30 15:54 Drew Adams
2020-11-01 12:56 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2020-10-30 15:54 UTC (permalink / raw)
To: 44330
"Return true if PREDICATE is true of any element of SEQ or SEQs.
If so, return the true (non-nil) value returned by PREDICATE."
^^^^^^^^^^^^^^^^^^^^^^^^^^^
The second sentence is meaningless/underspecified. If the function
stops as soon as it finds the first element for which PREDICATE is
true then the doc should say that it returns the value returned by
PREDICATE _for that element_.
Without specifying, in some way, for which element the application of
PREDICATE returns non-nil, "the value returned by PREDICATE" has no
meaning.
In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.18362
Configured using:
`configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#44330: 26.3; doc string of `cl-some'
2020-10-30 15:54 bug#44330: 26.3; doc string of `cl-some' Drew Adams
@ 2020-11-01 12:56 ` Lars Ingebrigtsen
2020-11-01 17:17 ` Basil L. Contovounesios
2020-11-01 17:45 ` Drew Adams
0 siblings, 2 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-01 12:56 UTC (permalink / raw)
To: Drew Adams; +Cc: 44330
Drew Adams <drew.adams@oracle.com> writes:
> "Return true if PREDICATE is true of any element of SEQ or SEQs.
> If so, return the true (non-nil) value returned by PREDICATE."
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> The second sentence is meaningless/underspecified. If the function
> stops as soon as it finds the first element for which PREDICATE is
> true then the doc should say that it returns the value returned by
> PREDICATE _for that element_.
>
> Without specifying, in some way, for which element the application of
> PREDICATE returns non-nil, "the value returned by PREDICATE" has no
> meaning.
I've now clarified the doc string here in Emacs 28.
However, the function is not guaranteed to stop at the first non-nil
predicate value, so that's not specified.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#44330: 26.3; doc string of `cl-some'
2020-11-01 12:56 ` Lars Ingebrigtsen
@ 2020-11-01 17:17 ` Basil L. Contovounesios
2020-11-02 15:11 ` Lars Ingebrigtsen
2020-11-01 17:45 ` Drew Adams
1 sibling, 1 reply; 5+ messages in thread
From: Basil L. Contovounesios @ 2020-11-01 17:17 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 44330
Lars Ingebrigtsen <larsi@gnus.org> writes:
> I've now clarified the doc string here in Emacs 28.
Why not backport it to emacs-27?
Thanks,
--
Basil
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#44330: 26.3; doc string of `cl-some'
2020-11-01 12:56 ` Lars Ingebrigtsen
2020-11-01 17:17 ` Basil L. Contovounesios
@ 2020-11-01 17:45 ` Drew Adams
1 sibling, 0 replies; 5+ messages in thread
From: Drew Adams @ 2020-11-01 17:45 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 44330
> > "Return true if PREDICATE is true of any element of SEQ or SEQs.
> > If so, return the true (non-nil) value returned by PREDICATE."
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> > The second sentence is meaningless/underspecified. If the function
> > stops as soon as it finds the first element for which PREDICATE is
> > true then the doc should say that it returns the value returned by
> > PREDICATE _for that element_.
> >
> > Without specifying, in some way, for which element the application of
> > PREDICATE returns non-nil, "the value returned by PREDICATE" has no
> > meaning.
>
> I've now clarified the doc string here in Emacs 28.
>
> However, the function is not guaranteed to stop at the first non-nil
> predicate value, so that's not specified.
According to the definition of Common Lisp, it is
ABSOLUTELY guaranteed to do just that.
https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node143.html
`some' returns as soon as any invocation of predicate
returns a non-nil value; some returns that value.
If the end of a sequence is reached, some returns nil.
Thus, considered as a predicate, it is true if some
invocation of predicate is true.
And read more on that page - more about this guarantee,
and more about it applying to ALL of the functions some,
every, notany, and notevery.
Is this a bug with the implementation of `cl-some'?
Or is it a doc bug?
Does Emacs `cl-some' pretend to respect the CL
definition of `some'? If not, the doc should say
that explicitly, and it should spell out just how
it deviates from support of the standard.
(So far, this bug has, in effect, been declared
"won't fix".
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#44330: 26.3; doc string of `cl-some'
2020-11-01 17:17 ` Basil L. Contovounesios
@ 2020-11-02 15:11 ` Lars Ingebrigtsen
0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-02 15:11 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: 44330
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> I've now clarified the doc string here in Emacs 28.
>
> Why not backport it to emacs-27?
It didn't really seem vital (to put it mildly).
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-11-02 15:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-30 15:54 bug#44330: 26.3; doc string of `cl-some' Drew Adams
2020-11-01 12:56 ` Lars Ingebrigtsen
2020-11-01 17:17 ` Basil L. Contovounesios
2020-11-02 15:11 ` Lars Ingebrigtsen
2020-11-01 17:45 ` Drew Adams
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.