lua-users home
lua-l archive

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


Luiz Henrique de Figueiredo wrote:
>> That was my first idea but it doesn't work because metamethods are
>> not invoked for "foo".."bar".
> 
> If __concat was invoked for .. then how would you do a raw concat?

Like with all relaxations of the rule 'a metamethod is called only when
the operation would be invalid', by calling the function 'rawconcat',
which would be added to the raw* API group (with rawequal, rawset,
rawget).

I'm not advocating that addition though, these relaxations beyond
complicating the language also slow it down, they should be kept to a
minimum.