[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: state of the Lua nation on resource cleanup
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 17 Feb 2009 15:14:44 -0300
>> I do not see why the need for the <scoped_statements>. It would be
>> simpler to add only a new form of locals. Something like
>> local finalized f, g = ...
>> that calls ":close()" (or __gc??) when it goes out of scope. Of
>> you can (should?) use a conventional do-end around it:
> And all of that can easily be done using token modifiers.
> Case solved? :)
I do not see how this can be done with token modifiers, if we want to
handle exceptional exits too.