GNU bug report logs - #32463
27.0.50; (logior -1) => 4611686018427387903

Previous Next

Package: emacs;

Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>

Date: Fri, 17 Aug 2018 03:31:02 UTC

Severity: normal

Found in version 27.0.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: andrewjmoreton <at> gmail.com, pipcet <at> gmail.com, 32463 <at> debbugs.gnu.org
Subject: bug#32463: 27.0.50; (logior -1) => 4611686018427387903
Date: Sat, 18 Aug 2018 12:59:07 -0700
Eli Zaretskii wrote:

>> we can make (lsh A B) signal an error if A is a
>> bignum and B is negative, since there's nothing we can do there that is
>> reasonable and is compatible with the fixnum behavior.

> If that's the best we can do, fine.
OK, let's go that route.

> It is IMO absurd for us to deprecate a valid and useful operation just
> because we added bignums.

It would indeed be absurd if lsh were still valid and useful. However, because 
lsh assumes fixed-width integers its overall utility is negative for new Elisp 
code because it mostly just introduces opportunities for confusion. This is why 
Common Lisp and Scheme don't have lsh. Backward compatibility is the only reason 
Emacs Lisp should have lsh. (Obviously we can't simply remove lsh.)




This bug report was last modified 6 years and 320 days ago.

Previous Next


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