lua-users home
lua-l archive

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


On 9 May 2010 20:57, HyperHacker <hyperhacker@gmail.com> wrote:
> Use metatables. Accessing a key from any type which doesn't have a metatable
> for it besides a table is an error.
>
> Cheers,
>
> Andre
>

That's what I've been doing; the question is should nil have a
metatable to make __index return nil (and perhaps print a warning)?

Printing a warning would make it pretty much unusable as a normal feature though, so I don't see the point. It seems to me you'd want it on all the way or not at all.

    henk