unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* lsh function documentation
@ 2024-01-30 11:34 Ulrich Mueller
  2024-01-31 14:49 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Ulrich Mueller @ 2024-01-30 11:34 UTC (permalink / raw)
  To: emacs-devel

The function documentation of lsh says:
| Most uses of this function turn out to be mistakes.  We recommend
| to use ‘ash’ instead, unless COUNT could ever be negative, and
| if, when COUNT is negative, your program really needs the special
| treatment of negative COUNT provided by this function.

I understand that lsh has no useful semantics for negative bignums
(bug #32463). However, old versions of the Lisp Reference Manual list
lsh and ash in the same section, and don't prefer either function:
https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/lispref/numbers.texi?h=emacs-26.3#n811

So why would programmers who had used something like (lsh x 8) in their
code be called out for making a mistake?

Couldn't lsh's documentation just say that the function is deprecated
and that ash should be used instead? 



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

end of thread, other threads:[~2024-01-31 19:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-30 11:34 lsh function documentation Ulrich Mueller
2024-01-31 14:49 ` Eli Zaretskii
2024-01-31 16:15   ` Ulrich Mueller
2024-01-31 16:48     ` Eli Zaretskii
2024-01-31 17:01       ` Ulrich Mueller
2024-01-31 19:27         ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).