[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Syntactical ugliness - does it matter?
- From: Dibyendu Majumdar <mobile@...>
- Date: Wed, 5 Jun 2019 15:46:06 +0100
On Wed, 5 Jun 2019 at 15:35, Coda Highland <chighland@gmail.com> wrote:
> It's not a problem when the proposed extension is around, but it does introduce inconsistencies with past versions of Lua, and there's still one grammatical ambiguity.
>
> local resource
> x = 3
>
> Am I declaring a resource named x with the value of 3, or am I declaring a variable named resource with no initial value, and then setting an existing variable named x to 3?
Here you are declaring a variable named resource just as you would in
existing versions of Lua. I don't see an ambiguity.
>
> Having some sort of signifier also greatly reduces the complexity of parsers and preprocessors, so I strongly oppose doing this without any sort of syntactic indication. I prefer @ over <> but there needs to be SOMETHING.
Okay that is a different concern. Making a resource declaration ugly
and therefore visible is not necessarily a bad thing.
local @resource x
Makes it very visible.
But overuse of @ in a program can make it very hard to read.
Imagine
local @constant ...
a few times.
Regards
- References:
- Syntactical ugliness - does it matter?, Dibyendu Majumdar
- Re: Syntactical ugliness - does it matter?, Pavel
- Re: Syntactical ugliness - does it matter?, Oliver Kroth
- Re: Syntactical ugliness - does it matter?, Ulrich Schmidt
- Re: Syntactical ugliness - does it matter?, Sergey Zakharchenko
- Re: Syntactical ugliness - does it matter?, Rodrigo Azevedo
- Re: Syntactical ugliness - does it matter?, Egor Skriptunoff
- Re: Syntactical ugliness - does it matter?, Dibyendu Majumdar
- Re: Syntactical ugliness - does it matter?, Ryan Ford
- Re: Syntactical ugliness - does it matter?, szbnwer@<a href="/cgi-bin/echo.cgi?gmail.com">...</a>
- Re: Syntactical ugliness - does it matter?, Matthew Wild
- Re: Syntactical ugliness - does it matter?, Dibyendu Majumdar
- Re: Syntactical ugliness - does it matter?, Coda Highland