lua-users home
lua-l archive

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


Because proxy tables don't work well with pairs and next, etc..

They are also an extra, mostly-empty table to carry around though I can
imagine ways to get around that by encoding the keys and providing __index
and __newindex methods that know about the encoding.

Mark

on 9/5/03 12:53 PM, Luiz Henrique de Figueiredo at lhf@tecgraf.puc-rio.br
wrote:

>> For some structures, it is really useful to have a write metamethod that is
>> always called rather than only being called when the index isn't present.
> 
> Why not use a proxy table with a __newindex method?
> --lhf
>