[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: number of result value for __len metamethod
- From: Thomas Lavergne <thomas.lavergne@...>
- Date: Tue, 09 Jan 2007 17:21:08 +0100
Is there any reason for the __len metamethod to reduce only allow
returning a single value ?
The pseudo code in the manual :
if h then
-- call the handler with the operand
return h(op)
doesn't seems to do this adjustement.
I actually write a matrix object in lua, and when implementing the __len
metamethod, I want to return two values, the number of row and the
number of col. But lua remove the second return value.
Is it ok too remove this limitation, or does this have some not so nice
side-effects ?
Tom
--
Thomas Lavergne "Le vrai rêveur est celui qui rêve
de l'impossible." (Elsa Triolet)
thomas.lavergne@reveurs.org http://reveurs.org