Hi Daniel,
sorry, mixed up aggregated and union types (my son wanted to paly R6).
Corrected and replied.
I assume Jochen's suggestion is coming from JavaScript/Kotlin, where the
type of a function (method) is given after the colon.
I think its readability is inferior to the C/C++/Java/... approach, and
is only therefore suitable for often-not-typed languages such as
JavaScript. Apart from it feeling alien to me in the Java/Groovy world,
I fear next thing someone would suggest we introduce it into Groovy,
which makes sense, "since we already use it in the Closure argument
syntax"...
Therefore I think we should take a little bit of time to explore
alternative syntax varieties :-)
Cheers,
mg
On 16/02/2019 18:03, Daniel.Sun wrote:
Hi mg,
I totally understand that you want to move this along, however I have just
added a comment, suggesting an alternative, more concise syntax, which I
believe would be worth considering:
Thanks for your suggestion :-)
As | is reserved for Union Type, I'd be inclined to use ; instead of |
P.S. I replied you in JIRA just now (
https://issues.apache.org/jira/browse/GROOVY-8992?focusedCommentId=16770141&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16770141
)
Cheers,
Daniel.Sun
-----
Apache Groovy committer
Blog: http://blog.sunlan.me
Twitter: @daniel_sun
--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html