[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Next Version of Lua? (__iter metamethod)
- From: Mark Hamburg <mark@...>
- Date: Wed, 10 Jun 2009 08:30:27 -0700
With regard to __setindex, I was just thinking this morning about the
costs associated with creating read-only tables and thinking that it
would be worth benchmarking the approach of using a stub userdata:
ud.mt = { __index = read-only-table }
And using a proxy table:
{}.mt = { __index = read-only-table, __newindex = error-function }
__setindex would be the simplest option but would then need to be
benchmarked for its effect on all table assignments.
Mark
- References:
- Next Version of Lua?, Olivier Hamel
- Re: Next Version of Lua?, Jim Whitehead II
- Re: Next Version of Lua?, Olivier Hamel
- Re: Next Version of Lua?, Luiz Henrique de Figueiredo
- Re: Next Version of Lua? (again, \x## notation), Ico
- Re: Next Version of Lua? (again, \x## notation), Luiz Henrique de Figueiredo
- RE: Next Version of Lua? (__iter metamethod), John Hind
- Re: Next Version of Lua? (__iter metamethod), Luiz Henrique de Figueiredo
- RE: Next Version of Lua? (__iter metamethod), John Hind
- Re: Next Version of Lua? (__iter metamethod), Adrian Sietsma