[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Syntactical ugliness - does it matter?
- From: Xavier Wang <weasley.wx@...>
- Date: Thu, 6 Jun 2019 00:21:06 +0800
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
No, it doesn’t work. There are attributes for variables, but not for value.
--
regards,
Xavier Wang.