GNU bug report logs -
#59745
26.3; Rename `string-collate-lessp' to respect the convention
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Thu, 1 Dec 2022 16:20:02 UTC
Severity: wishlist
Tags: wontfix
Found in version 26.3
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59745 in the body.
You can then email your comments to 59745 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59745
; Package
emacs
.
(Thu, 01 Dec 2022 16:20:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Drew Adams <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 01 Dec 2022 16:20:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
(elisp) `Coding Conventions' tells us:
If the purpose of a function is to tell you whether a certain
condition is true or false, give the function a name that ends in
'p' (which stands for "predicate"). If the name is one word, add
just 'p'; if the name is multiple words, add '-p'. Examples are
'framep' and 'frame-live-p'.
`string-collate-lessp' should, according to convention, be renamed to
`string-collate-less-p', no? Every such misnaming encourages others,
as people tend to base new names on names they see for existing things.
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.19044
Configured using:
`configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 01 Dec 2022 16:39:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59745
; Package
emacs
.
(Thu, 01 Dec 2022 16:51:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 59745 <at> debbugs.gnu.org (full text, mbox):
tags 59745 wontfix
close 59745
thanks
> From: Drew Adams <drew.adams <at> oracle.com>
> Date: Thu, 1 Dec 2022 16:19:31 +0000
>
> (elisp) `Coding Conventions' tells us:
>
> If the purpose of a function is to tell you whether a certain
> condition is true or false, give the function a name that ends in
> 'p' (which stands for "predicate"). If the name is one word, add
> just 'p'; if the name is multiple words, add '-p'. Examples are
> 'framep' and 'frame-live-p'.
>
> `string-collate-lessp' should, according to convention, be renamed to
> `string-collate-less-p', no? Every such misnaming encourages others,
> as people tend to base new names on names they see for existing things.
We also have bufferp, stringp etc., so -lessp is not so bad, especially
since it's modeled on string-lessp.
And anyway, it's too late now for renaming.
Closing.
Added tag(s) wontfix.
Request was from
Eli Zaretskii <eliz <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 01 Dec 2022 16:51:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
59745 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com>
Request was from
Eli Zaretskii <eliz <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 01 Dec 2022 16:51:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59745
; Package
emacs
.
(Thu, 01 Dec 2022 18:39:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 59745 <at> debbugs.gnu.org (full text, mbox):
> We also have bufferp, stringp etc., so -lessp
> is not so bad, especially since it's modeled
> on string-lessp.
>
> And anyway, it's too late now for renaming.
> Closing.
OK, it's too late. Understood.
___
But what you say wrt `string-lessp' doesn't
correspond to what the convention is, as it's
documented now. `bufferp' and `stringp' _do_
respect the convention.
If what you say is to be the _new_ convention,
or a correction to how the convention should be
specified, then please consider updating the doc
to reflect that. Currently, what we say should
be done is (sometimes) not what we do.
___
Note that `string-lessp' itself doesn't respect
the current convention.
`buffer-live-p' does respect it - it should be
the model for a name with multiple parts/words
(per the current convention).
`string-lessp' in fact illustrates what I said:
"Every such misnaming encourages others, as
people tend to base new names on names they
see for existing things."
Exactly that - you're now citing `string-lessp'
as a precedent. It's an easy, slippery slope.
It's not because there've been some unfortunate
misnamings that we should create more, based on
those as precedent.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59745
; Package
emacs
.
(Thu, 01 Dec 2022 18:51:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 59745 <at> debbugs.gnu.org (full text, mbox):
> From: Drew Adams <drew.adams <at> oracle.com>
> CC: "59745 <at> debbugs.gnu.org" <59745 <at> debbugs.gnu.org>
> Date: Thu, 1 Dec 2022 17:54:43 +0000
>
> `string-lessp' in fact illustrates what I said:
>
> "Every such misnaming encourages others, as
> people tend to base new names on names they
> see for existing things."
>
> Exactly that - you're now citing `string-lessp'
> as a precedent. It's an easy, slippery slope.
Yes. The manual says how things should be done. Life(TM) sometimes
diverges.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 30 Dec 2022 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 264 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.