[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: tonumber metamethod?
- From: Luis Carvalho <carvalho@...>
- Date: Thu, 6 Jan 2005 23:02:25 -0500
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. :)
A mathematician is a device for turning coffee into theorems.
-- P. Erdos
Applied Math PhD Student - Brown University
PGP Key: E820854A <email@example.com>
Description: PGP signature