* obnoxious byte-compiler warning from using lsh
@ 2023-09-08 10:26 Noah Friedman
2023-09-08 11:52 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Noah Friedman @ 2023-09-08 10:26 UTC (permalink / raw)
To: emacs-devel
The the master branch, the docstring for `lsh' says:
This function is provided for compatibility. In new code, use `ash'
instead."
`lsh' and `ash' are not the same thing, the difference is important and
they are both essential operators. This proffered suggestion, along with
the byte compiler warning, is...well, it's not even wrong. It's just a
non-sequitur.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: obnoxious byte-compiler warning from using lsh
2023-09-08 10:26 obnoxious byte-compiler warning from using lsh Noah Friedman
@ 2023-09-08 11:52 ` Eli Zaretskii
2023-09-11 0:41 ` Richard Stallman
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2023-09-08 11:52 UTC (permalink / raw)
To: Noah Friedman; +Cc: emacs-devel
> From: Noah Friedman <noah@splode.com>
> Date: Fri, 08 Sep 2023 03:26:09 -0700 (PDT)
>
> The the master branch, the docstring for `lsh' says:
>
> This function is provided for compatibility. In new code, use `ash'
> instead."
>
> `lsh' and `ash' are not the same thing, the difference is important and
> they are both essential operators. This proffered suggestion, along with
> the byte compiler warning, is...well, it's not even wrong. It's just a
> non-sequitur.
We are aware that ash and lsh are not the same, but we still want to
urge people to use ash, since in our experience most uses of lsh are
mistakes.
If you have a real-life use case where using ash simply isn't going to
work, please describe it.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: obnoxious byte-compiler warning from using lsh
2023-09-08 11:52 ` Eli Zaretskii
@ 2023-09-11 0:41 ` Richard Stallman
2023-09-15 7:18 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2023-09-11 0:41 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: noah, emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> We are aware that ash and lsh are not the same, but we still want to
> urge people to use ash, since in our experience most uses of lsh are
> mistakes.
That may be true, but I find the existing doc string confusing. It
says
This function is provided for compatibility. In new code, use ‘ash’
instead.
To me, that means that `lsh' and `ash' are equivalent and you should
simply replace the former with the latter. Of course, they are not
equivalent, and I don't think that's what the person who wrote that
text, meant, but I can't see what it is intended to mean. Simply
using `ash' instead of `lsh' is not correct.
How about this?
Most uses of this function turn out to be mistakes.
Before you use it, we urge you to think very carefully
about whether COUNT will ever be negative, and if so,
what results your program needs to get in that case. If you can
do the job with code that uses `ash' instead, we recommend that.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: obnoxious byte-compiler warning from using lsh
2023-09-11 0:41 ` Richard Stallman
@ 2023-09-15 7:18 ` Eli Zaretskii
0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2023-09-15 7:18 UTC (permalink / raw)
To: rms; +Cc: noah, emacs-devel
> From: Richard Stallman <rms@gnu.org>
> Cc: noah@splode.com, emacs-devel@gnu.org
> Date: Sun, 10 Sep 2023 20:41:16 -0400
>
> How about this?
>
> Most uses of this function turn out to be mistakes.
> Before you use it, we urge you to think very carefully
> about whether COUNT will ever be negative, and if so,
> what results your program needs to get in that case. If you can
> do the job with code that uses `ash' instead, we recommend that.
Thanks, I made it say
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-15 7:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-08 10:26 obnoxious byte-compiler warning from using lsh Noah Friedman
2023-09-08 11:52 ` Eli Zaretskii
2023-09-11 0:41 ` Richard Stallman
2023-09-15 7:18 ` 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.