[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: A metamethod to be called when a variable goes out of scope?
- From: Marc Balmer <marc@...>
- Date: Wed, 18 Oct 2023 17:03:18 -0300
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?
Thoughts?
- mb