lua-users home
lua-l archive

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


On Fri, Jul 27, 2012 at 7:34 AM, Paul K <paulclinger@yahoo.com> wrote:
> Is there a way to do it for shared upvalues? Just compile all the
> functions that share those upvalues together? Is there a way to detect
> that upvalues are shared?

That's probably only possible with code analysis ... there are
diminishing returns in this game, in the sense that we would do a lot
of sophisticated analysis and try to pretend to the developer that
everything is perfect and seamless, until they get bitten. Rather say,
caveat emptor, don't push it too far, and use it to recompile regular
module functions.

Petri did mention that this kind of interactive coding encourages free
use of globals (as does the interactive _prompt_ by necessity);  a
good compromise would be immutable upvalues.

steve d.