[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Syntactical ugliness - does it matter?
- From: Matthew Wild <mwild1@...>
- Date: Wed, 5 Jun 2019 15:35:26 +0100
On Wed, 5 Jun 2019 at 15:30, Dibyendu Majumdar <mobile@majumdar.org.uk> wrote:
>
> 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.
I don't see how the parser can determine whether I mean:
local resource x = foo()
to be interpreted as
local <toclose> x = foo()
or
local resource; x = foo()
Regards,
Matthew
Regards,
Matthew
- 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