[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: strings
- From: Cosmin Apreutesei <cosmin.apreutesei@...>
- Date: Wed, 16 Dec 2009 21:19:04 +0200
> 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.