lua-users home
lua-l archive

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


On 11/19/2013 09:58 AM, John Hind wrote:
Also, would it be useful to have per-value metatables on function type in the same way as for table and userdata?

You can already do that, just make a userdata or a table with a metatable and set the __call metamethod to your original function. From the users perspective it doesn't really matter as long as you never call type(xxx) on this pseudo-function.
--
Thomas