[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: suggestion: __typeof()
- From: Asko Kauppi <askok@...>
- Date: Tue, 17 Jan 2006 03:12:16 +0200
I'd suggest adding a "__typeof()" metamethod to Lua, similar to
__tostring() but used by the 'type()' built-in function.
The reason? It could be used with userdata, to provide more
information of the entity than just "userdata" does. For example, it
could provide "enum/SDL_INIT", telling that the entity is an
enumaration of logical type SDL_INIT.
The main benefit would be better error messages, and better type-wise
expandability of Lua in general.
Please consider,
-asko