all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: master c290b034e0f 1/2: Move `wholenump` alias definition
       [not found] ` <20230903094826.33FFAC045B5@vcs2.savannah.gnu.org>
@ 2023-09-03  9:54   ` Philip Kaludercic
  2023-09-03 10:02     ` Mattias Engdegård
  0 siblings, 1 reply; 8+ messages in thread
From: Philip Kaludercic @ 2023-09-03  9:54 UTC (permalink / raw)
  To: emacs-devel; +Cc: Mattias Engdegård

Mattias Engdegård <mattiase@acm.org> writes:

> branch: master
> commit c290b034e0f9a2660e455b9dad471ff54c7a840c
> Author: Mattias Engdegård <mattiase@acm.org>
> Commit: Mattias Engdegård <mattiase@acm.org>
>
>     Move `wholenump` alias definition
>     
>     * src/data.c (syms_of_data): From here...
>     * lisp/subr.el (wholenump): ...to here, with the other aliases.
> ---
>  lisp/subr.el | 1 +
>  src/data.c   | 2 --
>  2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/lisp/subr.el b/lisp/subr.el
> index 47fcbc2f317..0894a644d28 100644
> --- a/lisp/subr.el
> +++ b/lisp/subr.el
> @@ -2021,6 +2021,7 @@ instead; it will indirectly limit the specpdl stack size as well.")
>  (defalias 'store-match-data #'set-match-data)
>  (defalias 'chmod #'set-file-modes)
>  (defalias 'mkdir #'make-directory)
> +(defalias 'wholenump #'natnump)

I didn't know about this function (even though it appears to go back to
Emacs 19), but it might be confusing to some people.  In German "Ganze
Zahlen" (literally "whole numbers") is the term for integers, but
apparently Wikipedia[0] mentions that the term is ambiguous and might
refer both to ℤ and ℕ.  Is there anything that can be done about this?

[0] https://en.wikipedia.org/wiki/Whole_number

>  
>  ;; These were the XEmacs names, now obsolete:
>  (defalias 'point-at-eol #'line-end-position)
> diff --git a/src/data.c b/src/data.c
> index 377bcfce35d..9d6bf5a142c 100644
> --- a/src/data.c
> +++ b/src/data.c
> @@ -4369,8 +4369,6 @@ syms_of_data (void)
>    defsubr (&Sbool_vector_count_consecutive);
>    defsubr (&Sbool_vector_count_population);
>  
> -  set_symbol_function (Qwholenump, XSYMBOL (Qnatnump)->u.s.function);
> -
>    DEFVAR_LISP ("most-positive-fixnum", Vmost_positive_fixnum,
>  	       doc: /* The greatest integer that is represented efficiently.
>  This variable cannot be set; trying to do so will signal an error.  */);



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

* Re: master c290b034e0f 1/2: Move `wholenump` alias definition
  2023-09-03  9:54   ` master c290b034e0f 1/2: Move `wholenump` alias definition Philip Kaludercic
@ 2023-09-03 10:02     ` Mattias Engdegård
  2023-09-03 10:07       ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Mattias Engdegård @ 2023-09-03 10:02 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-devel

3 sep. 2023 kl. 11.54 skrev Philip Kaludercic <philipk@posteo.net>:

> I didn't know about this function (even though it appears to go back to
> Emacs 19), but it might be confusing to some people.  In German "Ganze
> Zahlen" (literally "whole numbers") is the term for integers, but
> apparently Wikipedia[0] mentions that the term is ambiguous and might
> refer both to ℤ and ℕ.  Is there anything that can be done about this?

Not a lot, for compatibility reasons. I agree completely about the uselessness of this alias and its poor naming.

(A useful definition for something named `wholenump` might be a function returning t for floats that are whole numbers, such as -3.0.)




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

* Re: master c290b034e0f 1/2: Move `wholenump` alias definition
  2023-09-03 10:02     ` Mattias Engdegård
@ 2023-09-03 10:07       ` Eli Zaretskii
  2023-09-03 10:22         ` Mattias Engdegård
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2023-09-03 10:07 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: philipk, emacs-devel

> From: Mattias Engdegård <mattias.engdegard@gmail.com>
> Date: Sun, 3 Sep 2023 12:02:01 +0200
> Cc: emacs-devel@gnu.org
> 
> 3 sep. 2023 kl. 11.54 skrev Philip Kaludercic <philipk@posteo.net>:
> 
> > I didn't know about this function (even though it appears to go back to
> > Emacs 19), but it might be confusing to some people.  In German "Ganze
> > Zahlen" (literally "whole numbers") is the term for integers, but
> > apparently Wikipedia[0] mentions that the term is ambiguous and might
> > refer both to ℤ and ℕ.  Is there anything that can be done about this?
> 
> Not a lot, for compatibility reasons. I agree completely about the uselessness of this alias and its poor naming.

I'm guessing that was for compatibility with some other Lisp.



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

* Re: master c290b034e0f 1/2: Move `wholenump` alias definition
  2023-09-03 10:07       ` Eli Zaretskii
@ 2023-09-03 10:22         ` Mattias Engdegård
  2023-09-03 10:41           ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Mattias Engdegård @ 2023-09-03 10:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: philipk, emacs-devel

3 sep. 2023 kl. 12.07 skrev Eli Zaretskii <eliz@gnu.org>:

> I'm guessing that was for compatibility with some other Lisp.


Maybe an obscure dialect (can't find it in Common Lisp, MacLisp or Interlisp).

The symbol `wholenump` is most commonly seen by users in errors as it's generated by CHECK_FIXNAT. It would be good to change that to the less obscure `natnump`, and it seems implausible that such a change would break any code. Any objections?




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

* Re: master c290b034e0f 1/2: Move `wholenump` alias definition
  2023-09-03 10:22         ` Mattias Engdegård
@ 2023-09-03 10:41           ` Eli Zaretskii
  2023-09-03 10:46             ` Philip Kaludercic
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2023-09-03 10:41 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: philipk, emacs-devel

> From: Mattias Engdegård <mattias.engdegard@gmail.com>
> Date: Sun, 3 Sep 2023 12:22:07 +0200
> Cc: philipk@posteo.net,
>  emacs-devel@gnu.org
> 
> 3 sep. 2023 kl. 12.07 skrev Eli Zaretskii <eliz@gnu.org>:
> 
> > I'm guessing that was for compatibility with some other Lisp.
> 
> 
> Maybe an obscure dialect (can't find it in Common Lisp, MacLisp or Interlisp).
> 
> The symbol `wholenump` is most commonly seen by users in errors as it's generated by CHECK_FIXNAT. It would be good to change that to the less obscure `natnump`, and it seems implausible that such a change would break any code. Any objections?

You assume that "natnump" will be much more clear? why?

It will definitely break decade-long habits, and for what? for the
benefit of some abstract rigor?



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

* Re: master c290b034e0f 1/2: Move `wholenump` alias definition
  2023-09-03 10:41           ` Eli Zaretskii
@ 2023-09-03 10:46             ` Philip Kaludercic
  2023-09-03 10:50               ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Philip Kaludercic @ 2023-09-03 10:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Mattias Engdegård, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Mattias Engdegård <mattias.engdegard@gmail.com>
>> Date: Sun, 3 Sep 2023 12:22:07 +0200
>> Cc: philipk@posteo.net,
>>  emacs-devel@gnu.org
>> 
>> 3 sep. 2023 kl. 12.07 skrev Eli Zaretskii <eliz@gnu.org>:
>> 
>> > I'm guessing that was for compatibility with some other Lisp.
>> 
>> 
>> Maybe an obscure dialect (can't find it in Common Lisp, MacLisp or Interlisp).
>> 
>> The symbol `wholenump` is most commonly seen by users in errors as
>> it's generated by CHECK_FIXNAT. It would be good to change that to
>> the less obscure `natnump`, and it seems implausible that such a
>> change would break any code. Any objections?
>
> You assume that "natnump" will be much more clear? why?

The term natural number is less likely to confuse a reader (though it is
not perfect either, due to disagreements on whether or not 0 is a
natural number).

> It will definitely break decade-long habits, and for what? for the
> benefit of some abstract rigor?



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

* Re: master c290b034e0f 1/2: Move `wholenump` alias definition
  2023-09-03 10:46             ` Philip Kaludercic
@ 2023-09-03 10:50               ` Eli Zaretskii
  2023-09-03 12:07                 ` Stefan Kangas
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2023-09-03 10:50 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: mattias.engdegard, emacs-devel

> From: Philip Kaludercic <philipk@posteo.net>
> Cc: Mattias Engdegård <mattias.engdegard@gmail.com>,
>   emacs-devel@gnu.org
> Date: Sun, 03 Sep 2023 10:46:40 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > You assume that "natnump" will be much more clear? why?
> 
> The term natural number is less likely to confuse a reader (though it is
> not perfect either, due to disagreements on whether or not 0 is a
> natural number).

It is less likely to confuse only if the reader has a very good idea
of what are "natural numbers".  I was questioning that assumption as
applicable to our audience.



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

* Re: master c290b034e0f 1/2: Move `wholenump` alias definition
  2023-09-03 10:50               ` Eli Zaretskii
@ 2023-09-03 12:07                 ` Stefan Kangas
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Kangas @ 2023-09-03 12:07 UTC (permalink / raw)
  To: Eli Zaretskii, Philip Kaludercic; +Cc: mattias.engdegard, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> The term natural number is less likely to confuse a reader (though it is
>> not perfect either, due to disagreements on whether or not 0 is a
>> natural number).
>
> It is less likely to confuse only if the reader has a very good idea
> of what are "natural numbers".  I was questioning that assumption as
> applicable to our audience.

FWIW, I find "whole numbers" confusing as a term for "natural numbers",
because it sounds to me like it refers to "integers".  Wikipedia claims
that the term is actually ambiguous and could mean either of those.

So I think the error type could be changed.  It's not the end of the
world to keep it though; when I last looked at it, we used it only in
one place.



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

end of thread, other threads:[~2023-09-03 12:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <169373450576.30740.4674573984693456027@vcs2.savannah.gnu.org>
     [not found] ` <20230903094826.33FFAC045B5@vcs2.savannah.gnu.org>
2023-09-03  9:54   ` master c290b034e0f 1/2: Move `wholenump` alias definition Philip Kaludercic
2023-09-03 10:02     ` Mattias Engdegård
2023-09-03 10:07       ` Eli Zaretskii
2023-09-03 10:22         ` Mattias Engdegård
2023-09-03 10:41           ` Eli Zaretskii
2023-09-03 10:46             ` Philip Kaludercic
2023-09-03 10:50               ` Eli Zaretskii
2023-09-03 12:07                 ` Stefan Kangas

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.