>
> if you have code like this:
>
> def m(int i) {
>    return i+1
> }
>
> Here you know i is an int, and then you can do a guarded version of
> static compilation that avoids all the boxing and dynamic method calls.
> This is then quite a bit faster on early executions. We used this before
> invokedynamic quite a bit.
>

I am trying to understand if it makes sense to implement type inference
(both variables and methods?) when using @CompileStatic instead of when
using `var`. Because at that point the developer is declaring he wants type
checking and all the compile time checks & performance improvements.

This way we could use `def` or `var` and they could be the same (with type
inference working on `def` too).

I don't know, I am trying to simplify things instead of adding `var` to the
language not because we need it but just to allow the copy-paste from Java.
We have `var` because of Java? Okay, but let it be a first citizen instead
of just a token to digest with no errors.

Cheers,
Gianluca

Reply via email to