lua-users home
lua-l archive

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


> I noticed the new string metamethods: why only
> sub,idiv,pow,div,add,mul,unm,mod? Why not the other operators (e.g.
> bitwise-and)?

We are phasing out coercions from strings to numbers. Removing them
from arithmetic operations would cause a lot of incompatibilities,
but we think (we may be wrong) that its need with bitwise operations
is much more rare. Coercion for bitwise operations is available
through the module 'bwcoercion.lua'.

-- Roberto