lua-users home
lua-l archive

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


Hi,

First of all, sorry for the unacceptable long delay; I was still putting
life back on tracks after a long holiday away from anything that
resembles a computer. :)

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

Nothing special: I was just curious. It would be interesting, however,
to implement something meaningful for tonumber depending on the class:
complex numbers could have an absolute value, sets could have a
cardinality, matrices, a determinant, and so on.

> 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).

Thanks for the reminder. :)

Cheers,
Luis.

-- 
A mathematician is a device for turning coffee into theorems.
        -- P. Erdos 

-- 
Luis Carvalho
Applied Math PhD Student - Brown University
PGP Key: E820854A <carvalho@dam.brown.edu>

Attachment: pgpPSxRVLkgjm.pgp
Description: PGP signature