Paul King

Results 56 comments of Paul King

Another example: ``` Set a = [-100, 100, 10] def avgAbsolute = a*.abs().with{ it.sum() / it.size() } // *. is collect shorthand // before assert 70 == avgAbsolute // after...

The list despread operator has nothing to do with Set assignment - it was just a way of removing some dupe in the above example (you could wonder why there...

Yes, the type is retained for methods which return a filter, subset or expansion of some original collection, e.g. things like: `grep`, `findAll`, `split`, `take`, `drop`, `intersect`, `plus`, `minus`, but...

+1 for higher-order kinds. But how to implement nicely? So many questions! :-) There is no implementation of @RetainType at present - just design discussions and prototyping bits of it....

I also get the `'other' has different root` problem on windows if I have the JVM and project directory on different drives, e.g. C: and D:. Or perhaps it is...

@radhe-soni Where is your windows temp directory?

I can replicate getting the NPE: ``` ... Caused by: java.lang.NullPointerException at org.codehaus.groovy.ast.GroovyCodeVisitor.lambda$visitListOfExpressions$0(GroovyCodeVisitor.java:202) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.codehaus.groovy.ast.GroovyCodeVisitor.visitListOfExpressions(GroovyCodeVisitor.java:202) ... ``` Where is the breakpoint for above screenshot? There is a guard...

Second one could just be intellij trying to display the null

I don't believe so. Please raise a Jira.

We have used code generators (hand-hacked throwaway Groovy scripts) from time to time to generate repeated patterns. We could enhance both the dynamic and static behaviours to do some kind...