[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: (not) handling new programming idioms with grace
- From: Dibyendu Majumdar <mobile@...>
- Date: Wed, 18 Jul 2018 18:13:33 +0100
On 18 July 2018 at 17:19, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
> We had something (scope-qualified locals) that seemed to be enough.
> Now we have this list of problems:
>
> - It does not create a new scope by itself;
> - It is not visible enough;
> - It still does not solve the problem for global variables;
> - It cannot supress exceptions.
>
Perhaps something simpler could be done? Such as ask a function to be
called on scope exit (normally or via exception) - similar to defer
statement in Go?
Then user code can do what it likes in that function - responsibility
of Lua ends with invoking the function.
Regards
Dibyendu