[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: upcoming changes in Lua 5.2
- From: Miles Bader <miles@...>
- Date: Wed, 20 Feb 2008 08:13:12 +0900
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',
Faith, n. Belief without evidence in what is told by one who speaks without
knowledge, of things without parallel.