lua-users home
lua-l archive

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


> This is a design decision in Lua programming that I've been faced with
> several time, whether you should accept indexables and callables, or
> tables and functions.

In the face of metamethods, type() becomes irrelevant -- it only tells
you how a value is implemented, not how it is expected to behave. I
see type() in the same family as rawset() and rawget(), so I never use
it on foreign objects.