lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2014-03-26 16:20 GMT+02:00 Rob Kendrick <rjek@rjek.com>:
> On Wed, Mar 26, 2014 at 02:15:55PM +0000, Daniel Silverstone wrote:
>> On Wed, Mar 26, 2014 at 07:21:11 +0200, Dirk Laurie wrote:
>> > Maybe we could have our cake and eat it. One of x>>4 or x<<-4 to mean logical,
>> > the other to mean arithmetic, shift.
>>
>> Negative is unpleasant IMO.  But <<< and >>> are perfectly reasonable operators.
>
> These would confuse me, as I've used languages in the past where these
> represent rotate, not shift.

I won't miss not having an operator for arithmetic shifts.

But the bit32 library has arshift. It does seem a pity to deprecate
something not
superseded by something better. Maybe the 64-bit arithmetic right shift can be
provided as math.arshift?