The idea is to introduce a grammar hack that notices `a++b` and
evaluates it with identical semantics to `a+ +b`. C++ used a similar
trick to allow `Foo<Bar<T>>` in addition to `Foo< Bar<T> >` for nested
template application, because it previously conflicted with `>>`. For
instance, consider `Foo<Bar<T>> name(arg);`: it used to be parsed as
`(Foo < Bar) < (T >> name(arg));`, but they made a breaking change to
make it parse as a variable declaration of type `Foo<Bar<T>>` instead,
invoking the type's constructor with `arg`. I was suggesting a similar
hack, just in this case taking advantage of something that is
currently invalid.

BTW, I'm no longer behind my suggestion, and was never strongly in
favor of it to begin with.

-----

Isiah Meadows
cont...@isiahmeadows.com
www.isiahmeadows.com

On Tue, Jul 9, 2019 at 2:50 PM ViliusCreator
<viliuskubilius...@gmail.com> wrote:
>
> Lexer already sees `++` as operator, not `+` operator**s**. It can be hard to 
> implement something like that.
>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to