groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MG <mg...@arscreat.com>
Subject Re: Groovy Champions proposal feedback
Date Fri, 16 Feb 2018 19:49:49 GMT


On 16.02.2018 01:52, Jochen Theodorou wrote:
> for the named parameters support the map solution does only not 
> suffice for the static compiler in the end... A pragmatic solution 
> would be to say foo(x:1) can call foo(int) if the parameter is named x 
> and that this call is taken even if there is a foo(Map) variant, plus 
> that dynamic Groovy will always call the map variant. And then 
> somebody has to implement this based on the java8 parameter 
> information (which means java8 will be required for this feature of 
> course). All doable, given time

While I like the flexibility of being dynamic in Groovy, the static, 
type safe case is imho important ( see also my recent groovypp comment), 
and I think there is currently also a rediscovery of the fact, that the 
larger a software project, the more static typing becomes valuable (see 
e.g also TypeScript vs JavaScript).

Just being able to use named parameters for Groovy classes would already 
be a 95% solution, since for me the most important application would be 
to be able to easily extend ctors which already have a lot of arguments.

The existing map based solution does not help with that, in addition to 
Intellisense not being able to lend any support...

For me that would probably be the #1 feature I would fund :-)
Cheers,
mg



Mime
View raw message