[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [NoW] About to-be-closed new syntax
- From: pocomane <pocomane_7a@...>
- Date: Thu, 21 Feb 2019 16:17:32 +0100
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.
local n, str = 42, "abc"
local * toclose cl = obj
local n, *cl, str = 42, obj, "abc"
local n, (cl), str = 42, obj, "abc"
A pun: to mark a variable "to-be-closed", we make its name enclosed in parentheses.
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,
consider a less overloaded term. "Defer" is the first one that comes to my mind.