lua-users home
lua-l archive

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


on 7/6/05 1:46 PM, Mark Hamburg at mhamburg@adobe.com wrote:

> Separate environments are the issue. If one wanted inheritance, one can get
> that by creating appropriate environments.
> 
> Note that this is more a theoretical question as opposed to a specific issue
> with venv. It came up because method chaining could benefit from using
> custom function environments, but it isn't really safe for the class
> constructor to just slam the function environment since the environment may
> already have been changed in some other use of a function.

There is the option of duplicating a function by dumping it and reloading
it. That seems excessive, however, and doesn't work if the function has
up-values.

Mark