[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56641: Deprecate `lsh`
From: |
Mattias Engdegård |
Subject: |
bug#56641: Deprecate `lsh` |
Date: |
Wed, 20 Jul 2022 16:30:25 +0200 |
20 juli 2022 kl. 14.21 skrev Po Lu <luangruo@yahoo.com>:
> So you're saying there is no possible use for expecting the value of
> this:
>
> (lsh most-negative-fixnum -1)
>
> to become:
>
> #x1000000000000000
That is only true when Emacs has been built for 62-bit fixnums. And no, I don't
see an obvious use other than for compatibility.
> What business does the byte compiler, or some idea
> of "platform independence" have in dictating that I should write extra
> code (instead of using something built-in) to implement a network
> protocol?
It sounds as if we are talking past one another. If you have a network protocol
that is somehow defined in terms of the size of fixnums in a particular build
of Emacs, then yes, I'd say that most people would think that your code should
make that explicit.
But you certainly don't need lsh to handle arbitrary binary data; it's not even
convenient. I'm not saying that you are wrong; perhaps I don't understand your
needs.
We could add functions for depositing and extracting bit fields in an integer,
basically encapsulating the common shift-and-mask operations. That would make
bit field manipulation less error-prone without compromising speed or
portability.
- bug#56641: Deprecate `lsh`, (continued)
- bug#56641: Deprecate `lsh`, Mattias Engdegård, 2022/07/19
- bug#56641: Deprecate `lsh`, Stefan Kangas, 2022/07/19
- bug#56641: Deprecate `lsh`, Eli Zaretskii, 2022/07/19
- bug#56641: Deprecate `lsh`, Po Lu, 2022/07/19
- bug#56641: Deprecate `lsh`, Eli Zaretskii, 2022/07/19
- bug#56641: Deprecate `lsh`, Po Lu, 2022/07/19
- bug#56641: Deprecate `lsh`, Eli Zaretskii, 2022/07/20
- bug#56641: Deprecate `lsh`, Mattias Engdegård, 2022/07/20
- bug#56641: Deprecate `lsh`, Po Lu, 2022/07/20
- bug#56641: Deprecate `lsh`, Eli Zaretskii, 2022/07/20
- bug#56641: Deprecate `lsh`,
Mattias Engdegård <=
- bug#56641: Deprecate `lsh`, Po Lu, 2022/07/20
- bug#56641: Deprecate `lsh`, Mattias Engdegård, 2022/07/21
bug#56641: Deprecate `lsh`, Lars Ingebrigtsen, 2022/07/23
bug#56641: Deprecate `lsh`, Basil L. Contovounesios, 2022/07/23
bug#56641: Deprecate `lsh`, Mattias Engdegård, 2022/07/23
bug#56641: Deprecate `lsh`, Basil L. Contovounesios, 2022/07/23