all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#59745: 26.3; Rename `string-collate-lessp' to respect the convention
@ 2022-12-01 16:19 Drew Adams
  2022-12-01 16:50 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2022-12-01 16:19 UTC (permalink / raw)
  To: 59745

(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''






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#59745: 26.3; Rename `string-collate-lessp' to respect the convention
  2022-12-01 16:19 bug#59745: 26.3; Rename `string-collate-lessp' to respect the convention Drew Adams
@ 2022-12-01 16:50 ` Eli Zaretskii
  2022-12-01 17:54   ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2022-12-01 16:50 UTC (permalink / raw)
  To: Drew Adams; +Cc: 59745

tags 59745 wontfix
close 59745
thanks

> From: Drew Adams <drew.adams@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#59745: 26.3; Rename `string-collate-lessp' to respect the convention
  2022-12-01 16:50 ` Eli Zaretskii
@ 2022-12-01 17:54   ` Drew Adams
  2022-12-01 18:50     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2022-12-01 17:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 59745@debbugs.gnu.org

> 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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#59745: 26.3; Rename `string-collate-lessp' to respect the convention
  2022-12-01 17:54   ` Drew Adams
@ 2022-12-01 18:50     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2022-12-01 18:50 UTC (permalink / raw)
  To: Drew Adams; +Cc: 59745

> From: Drew Adams <drew.adams@oracle.com>
> CC: "59745@debbugs.gnu.org" <59745@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-01 18:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01 16:19 bug#59745: 26.3; Rename `string-collate-lessp' to respect the convention Drew Adams
2022-12-01 16:50 ` Eli Zaretskii
2022-12-01 17:54   ` Drew Adams
2022-12-01 18:50     ` Eli Zaretskii

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.