lua-users home
lua-l archive

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


Have you considered the idea recently discussed on this list of having
some type predicates which could used instead of "type(...) = ..."
(given that the latter is often flaky and the wrong thing in the
presence of metatables).

E.g., callable(...), indexable(...) etc.

Maybe a single general predicate would work, e.g., something like
"applicable (OBJ, KEY)" where KEY is the assocated metamethod ('__call',
'__index', etc).

-Miles

-- 
Faith, n. Belief without evidence in what is told by one who speaks without
knowledge, of things without parallel.