lua-users home
lua-l archive

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

See also:

I also endorse the notion of having a table swap function. I think I
suggested something like that once as well, but I may have just thought
about suggesting it.


on 10/15/04 9:24 AM, Lucas Ackerman at wrote:

> However, I think this is a strong argument for increasing the ease of
> using proxy tables, since they are a prominent idiom in Lua 5.  I've been
> thinking about adding the following:
> 1) A table internals swap (or identity swap if you like) function to
> efficiently proxy a table without losing identity.
> 2) Having a per-table proxy-mode flag to force __index and __newindex use
> regardless of existing keys.  This is a kind of self-proxy or auto-proxy
> behavior.  It would be much cheaper than always checking metatables, and
> it doesn't require an extra table like the typical proxy idiom does.
> These would allow use of either proxies or forced lookups (or both)
> conveniently, and are in the minimalist Lua spirit of extensibility.
> Lua does have its rough edges and room for growth, and your suggestions
> and participation are appreciated even if they don't provoke debate.