lua-users home
lua-l archive

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


-  proxy constructions

Did I miss something? I thought this proxy stuff was not part of the
language, but rather a common lua pattern.

There is an (undocumented?) function "newproxy" in the baselib. But actually I meant the proxy idea in general, which is related to...

+  __settable, __gettable metamethods

As I see it, those are meant to be counterparts to __index and
__newindex, with the difference that they intercept accesses to values
already defined in the table. With those one could get rid of the
proxy constructions.

Exactly. ("settable" and "gettable" were tag methods in Lua 4, hence my notation. Maybe __getindex and __setindex would be more appropriate Lua 5 names.)

--
Wim