lua-users home
lua-l archive

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


On Tue, Jul 26, 2016 at 6:34 AM, Rodrigo Azevedo <rodrigoams@gmail.com> wrote:
> Let's try:
>
> 0) define __something as "reserved" words.
>
> 1) Define the table as its own "metatable" by default, namely, search for
> __something when appropriate and fallback to the one defined by
> setmetatable() (standard behavior) (why not?)

With this change it's no longer possible to use tables with arbitrary
string keys.
Every `t[k] = v` assignment will soon cause an error if `k` happens to
be one of metamethod names.

-- Peter