[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:30:06 +0100
On Wed, 5 Jun 2019 at 15:08, Matthew Wild <mwild1@gmail.com> wrote:
>
> On Wed, 5 Jun 2019 at 12:53, szbnwer@gmail.com <szbnwer@gmail.com> wrote:
> > Ryan Ford:
> > > I'm sure this would break the current syntax though as you would be initializing the local "resource" and assigning a new value to the global "x"
> >
> > if `resource` is a keyword, then it wont mess with anything, and no
> > new stuff will be usable in older versions, no matter what.
>
> As the maintainer of a >50k-line Lua codebase that extensively uses
> local variables named "resource", I beg to differ with the "it won't
> mess with anything" assertion.
>
Hi as I already explained in a previous post, there is no need for a
new keyword.
The parsing of:
local <resource> x
local resource x
are the same - both utilize the fact that after local a variable name
is expected, so anything in between can be easily parsed especially if
they are just identifiers.
Hence the markers are superfluous - at least for the proposed extensions.
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