groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MG <>
Subject Re: [VOTE] Polish the generics type syntax for closure
Date Sat, 16 Feb 2019 18:57:19 GMT
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 
Therefore I think we should take a little bit of time to explore 
alternative syntax varieties :-)


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 (
> )
> Cheers,
> Daniel.Sun
> -----
> Apache Groovy committer
> Blog:
> Twitter: @daniel_sun
> --
> Sent from:

View raw message