[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Scoped variable attribute syntax
- From: Dibyendu Majumdar <mobile@...>
- Date: Sun, 16 Dec 2018 11:36:21 +0000
Hi Roberto,
Instead of using something like:
local *toclose var
is it possible to use:
local var :scoped
or
local var @scoped
That the annotation uses either ':' or '@' sign, and follows the
variable name rather than preceding it. Personally I think the
asterisk sign reminds one of C pointers ...
I am thinking of something I had suggested a while back
(http://lua-users.org/lists/lua-l/2015-07/msg00567.html) - i.e.
allowing a way to 'annotate' declarations in a compatible way. That
is, if Lua encounters an annotation, it should ignore if it is not
recognized - that way language extensions can support type annotations
or other types of annotations while still being compatible with Lua.
Thanks and Regards
Dibyendu