[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (work1) now available
- From: Leo Razoumov <slonik.az@...>
- Date: Thu, 14 Jan 2010 16:38:48 -0500
On 2010-01-14, David Burgess <dabsoft@gmail.com> wrote:
> I happen to agree with all that Mike has presented.
> especially:
>
> > There is no cost to have two explicitly named functions and it
> > makes the intent immediately obvious:
> >
> > bit.lshift(x, 8) vs. bit.rshift(x, 8)
> >
> > Readibility is important.
>
As someone who did bit-operations for living (chip design) I can
attest that having distinct names for left and right shifts *is*
important. C-language got it exactly right with its << and >>
operators. In Lua lshift and rshift would do just fine.
--Leo--