lua-users home
lua-l archive

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


On Mon, 06 Jul 2009 17:44:07 -0400
Doug Rogers <doug.rogers@elbitsystems-us.com> wrote:

> IMHO, the short reply to the original question is "performance". 
> Requiring the attachment of a metatable for __env would levy the 
> overhead of a table lookup, possibly a chain of them due to __index,
> for each function call.

Or at least each function call to a function that had a metatable; a
check for such a thing shouldn't be expensive, and short-circuiting
things like this has been discussed before.

B.