lua-users home
lua-l archive

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


On Tue, Nov 19, 2013 at 12:34 PM, Lorenzo Donati
<lorenzodonatibz@tiscali.it> wrote:
> individual metatables (what would happen in your envisioned case if an
> object bound to an _ENV "escapes" that env?).

I'd imagine that it loses its magic powers, it would just be a plain
function again.

> but I fear that it is not easy to do without sacrificing overall Lua
> performance or code size (I'd like to be proven wrong, though).

That is absolutely the question I'd like to see answered - if John
could give us some numbers based on his patch, for instance.

As for the point Thomas mentions, objects that behave like functions,
there is some penalty but not as much as you'd think (around 30%
slower last time I checked) so it can be a good design choice.