lua-users home
lua-l archive

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


> I guess strings have metatables, but numbers don't?

Yes. Number *can* have metatables, but none is set by default.
I'm not sure you'd want to write 42:sin or 42:abs, but you could by setting
the metatables of numbers to be math. (You'd have to do it in C.)
--lhf