lua-users home
lua-l archive

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


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