GNU bug report logs - #56641
Deprecate `lsh`

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Tue, 19 Jul 2022 13:39:01 UTC

Severity: normal

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


Message #56 received at 56641 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: 56641 <at> debbugs.gnu.org
Subject: Re: bug#56641: Deprecate `lsh`
Date: Sat, 23 Jul 2022 09:26:04 +0200
Mattias Engdegård <mattiase <at> acm.org> writes:

> The function `lsh` works almost like `ash` but is much slower, cannot
> be constant-folded by the compiler, and above all has confusing
> semantics for historical reasons. Using `lsh` instead of `ash` is
> always a mistake.
>
> For these reasons we should deprecate `lsh`. It is not important to
> remove it as soon as possible, but to dissuade people from
> accidentally using it in their code.

I agree.  I think the presence of `lsh' just confuses people.  Even when
Emacs didn't have bignums it was pretty odd, but I have absolutely no
idea what any theoretical use case would be today.





This bug report was last modified 2 years and 302 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.