lua-users home
lua-l archive

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


I agree with this. My issue is that I am potentially operating in a
memory constrained environment and I would rather avoid the
multiple copies of the functions in each thread. (maybe there
is a way to avoid this that I do not know about).

David Burgess

On 8/23/06, Mark Hamburg <mhamburg@adobe.com> wrote:
A way to tear off new copies of a function would definitely be useful. For
example, I've got a class system that allows for arbitrary sequences of
mixin classes. It would be great if when constructing a class out of mixins,
I could tear off fresh copies of the functions and give them environments
that would represent information such as their position in the mixin
sequence.

Without support for creating multiple versions of the same function with
different environments, one could almost replace setfenv with an extra
parameter to load to set the environment on the newly loaded function.

Mark