lua-users home
lua-l archive

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


2016-07-21 4:01 GMT+02:00 Michael Nelson <mikestar1313@gmail.com>:


> I rather miss Lua 5.2 and earlier

They're not gone. Not even Lua 1.0 is gone. Nobody forces you
to use Lua 5.3.

> And if the bit manipulation operators are the start of a trend, I don't care
> for that trend. ...  I understand that integers are useful to have, particularly
> where bit flipping as well as arithmetic are needed on the same data.

I hardly ever use the bit manipulation operators on integers, but
I like having the metamethods available for objects and strings.
For example,

    animal =  'pig' | 'dog' | 'cat'

can be defined to mean what you can see it should mean, wheres
using a Lua 5.2 arithmetic operator would produce a 'wat?' feeling.

> Maybe having integers as a distinct type would be of help by making
> the added complexity explicit.

Any change to any language that makes floating point zero
not equal to integer zero will be confusing, but that is what
happens when you compare values of different type.