lua-users home
lua-l archive

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




Il giorno mer 20 feb 2019, 21:25 Egor Skriptunoff <egor.skriptunoff@gmail.com> ha scritto:

6)
The new syntax "local * toclose" is weird.
Of course, such syntax would be useful if other modifiers (words after asterisk) are expected to be introduced in future Lua versions.
Otherwise, more simple syntax for "to-be-closed" variables might be nicer.
 
Currently:
   local n, str = 42, "abc"
   local * toclose cl = obj
 
Possible suggestions:
   local n, *cl, str = 42, obj, "abc"
or
   local n, (cl), str = 42, obj, "abc"
 
A pun: to mark a variable "to-be-closed", we make its name enclosed in parentheses.

-- Egor

I think we already have enough things to close, in any programming language. We close files, connections, blocks, scopes, transactions, ports, and so on.

Please,

please, please, please,

consider a less overloaded term. "Defer" is the first one that comes to my mind.

Pocomane,
Ciao.