r
off. There isn't a middle ground -- a way to disable any of the new syntax
additions in case they conflict with existing source code.
-Original Message-
From: Daniel.Sun
Sent: Saturday, May 9, 2020 3:14 PM
To: d...@groovy.incubator.apache.org
Subject: RE: About eliminating ambi
The vote for releasing Groovy 3 has passed with at least three +1 from PMC
members. In other words, all of changes of Groovy 3 have been reviewed and
not incubating any more.
As to safe indexing, we have to admit we missed some scenarios to check, so
the ambiguities are introduced by accident. But
sion" thread on the mailing list -- link below).
[1]
http://mail-archives.apache.org/mod_mbox/groovy-dev/201710.mbox/%3C2BA8478A2FBAFF4FBFDF1724FAD8C09E8C817AFE%40C111BKGPMBX48.ERF.thomson.com%3E
-Original Message-
From: Daniel.Sun
Sent: Thursday, May 7, 2020 6:43 PM
To: d...@groovy
Yep ;-)
Optional parentheses is nice to DSL but introduces some ambiguities too :-(
Cheers,
Daniel Sun
-
Apache Groovy committer & PMC member
Blog: http://blog.sunlan.me
Twitter: @daniel_sun
--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
On 08.05.20 04:36, J. David Beutel wrote:
[...]
but how does the .join(','):b() part get parsed into .join([',': b()])?
write it like this:
foo.bar x:y
where x is (','), y is b() and bar is join. And this is equal to (thanks
to optional parentheses):
foo.bar([x:y])
bye Jochen
On 2020-05-07 13:43 , Daniel.Sun wrote:
```
// https://issues.apache.org/jira/browse/GROOVY-9522
def a() { null }
def b() { '' }
a()?[b(), a()].join(','):b() // statement with ambiguities
```
The above statement with ambiguities can be parsed into:
1) safe indexing expression, `a()?[[b(), a()
Hi all,
Safe indexing has been introduced since Groovy 3.0.0, it is useful but
confuses both parser and users sometimes because it is not a real operator
in order to not breaking existing code as possible as we could. For example,
```
// https://issues.apache.org/jira/browse/GROOVY-9522
def a