lua-users home
lua-l archive

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


On 10/14/2013 07:44 AM, Carsten Fuchs wrote:
Am 14.10.2013 09:22, schrieb Dirk Laurie:

How about a metamethod __tobool ?

Then everyone could define him- or herself if and how any Lua type should evaluate to bool in a boolean expression. :-)

Best regards,
Carsten


I think it could be a to high performance hit to have a metamethod lookup on each and every condition or logical expression of a program.

--
Thomas