lua-users home
lua-l archive

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

It was thus said that the Great Marc Balmer once stated:
> When a variable is marked as to-be-closed with the <close> tag and it goes
> out of scope, the __close metamethod is called.
> What impact would calling a metamethod have, that is called when a
> variable goes out of scope and that has said metamethod defined?  Would
> the check for the presence of such a metamethod already introduce an
> inacceptable overhead?
> I am thinking of something along e.g.  __scope(), to be called when a
> variable goes out of scope?

  There were several such proposals in 2019 for this.  From my notes, the
following proposals were made:


  I've yet to go back and find references to individual threads about them.