lua-users home
lua-l archive

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


> is there any particular reason why there is a tostring but not a
> tonumber metamethod?

No reason, except that it never came up. What would you use a tonumber
metamethod for?

Also, please note that the tostring metamethod is not actually a core
metamethod, but rather a feature of the tostring function (and print
uses tostring).
--lhf