lua-users home
lua-l archive

Re: Syntactical ugliness - does it matter?

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


Hi,
On 3.06.2019 14:13, Luiz Henrique de Figueiredo wrote:
local const x = 5
local toclose f = ...
The only way to make this work is to add reserved words.
Otherwise, these already have a meaning in Lua. They are equivalent to
local const ; x = 5
local toclose ; f = ...
local x = 5
setattribute(x, {const=true}) -- or setattribute(x, "const")
local f = ...
setattribute(f, {toclose=true}) -- or setattribute(f, "toclose")
No change required in syntax, may backward compatible...
Does it work?
--
Regards,
Hakki Dogusan

AltStyle によって変換されたページ (->オリジナル) /