On 22/11/2019 17:51, Jochen Theodorou wrote:
So strictly spoken none of the calls to m1 and m2 should be supported
here. But this is a problem for the user, as the user is not used to
write 1.0d instead. And it will make a lot of programs cumbersome. But
it would be more correct.

I know you are arguing both sides, but I think we should be careful not to go down the easy route of being formally more correct (which is, of course, by definition less messy / requires less thought than the alternatives): Same as Java code can be pasted into Groovy, and it "just works" 99.99999...% of the time, I think we should strive for Groovy code to continue to compile & work as before where possible when the code is annotated with @CompileStatic, without giving up on one of the goals of static compilation, namely spotting (trivial) errors at compile time / being more safe.

Cheers,
mg






Reply via email to