lua-users home
lua-l archive

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


2016-07-26 10:45 GMT+02:00 Peter Melnichenko <mpeterval@gmail.com>:
> 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.

Readers of this thread may like to know that recent posts in the thread
'Quest: real world "Lua array with holes" usage' contain related if not
actually overlapping issues.