Vaughan McAlley wrote:
On 7 December 2010 05:16, Ralph Hempel wrote:
It seems to me that really only three operators needed, and the
implied direction of the shift value should be consistent across
all three, like this:
ashift - arithmetic shift (+right -left )
rotate - rotate (+right -left)
lshift - logical shift (+right -left)
I seem to recall that idea being proposed by the devs and it going
down very badly. Luckily with Lua it’s trivial to alias arshift as
ashift.
[snip snip]
I fully respect the language author's decision to do it whichever way
they choose. I was just pointing out the inconsistency in the shift
operators in case they had been staring at it so long that it was not
obvious to them :-)