[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Scoped variable *toclose syntax
- From: Sean Conner <sean@...>
- Date: Thu, 25 Apr 2019 17:02:10 -0400
It was thus said that the Great Roberto Ierusalimschy once stated:
> > Just to clarify - I think it is better to introduce a generic
> > annotation capability with a defined syntactic form and
> > interpretation, rather than just introducing something specific such
> > as '*toclose'. The feature can only be called a generic annotation
> > capability if Lua parser was able to skip over unrecognized
> > annotations, and if the syntax was expressive enough to be of real
> > practical use. This means that some definition of what/where is
> > allowed is required.
>
> Just to clarify: we have no intention of introducing a generic
> annotation capability to Lua now. We only wanted the syntax to
> be such that it could be extended in the future. All we want
> is to-be-closed variables.
Fair enough.
Some questions: Why the '*' and not something unused, like '@'?
do
local @toclose f = io.open(filename)
end
Also, might the name 'gcscope' be a better name?
do
local @gcscope f = io.open(filename)
end
Or maybe scopegc?
do
local @scopegc f = io.open(filename)
end
-spc (I mean, this is the time to bikeshed, right?)