Not trolling... why would this be complex? They already need to know the type of the right side of the expression, saying int x = 0.0 doesn't work, so they must already compare the lhs to the rhs. I would think that it would be fairly straight forward to defer the lhs type until after the rhs is known.
It's not complex to implement, but they'd have to consider all the weird cases, and write a section in the JLS for it, and probably check that other compilers can implement it reasonably, and check they're not shooting themself in the foot later.
It's also a new keyword.
(For an example of a weird case: x has what type here?
Been a while since I used java, why is that type ambiguous? Was it something like having to bind lambda expressions to an interface? Seems like inferring void=>void would be possible?
void=>void isn't a type in Java. It can be any interface that has a void=>void method - normally, which interface is deduced from the context you use it in (e.g. the type of the variable you assign it to).
5
u/MrBIMC Mar 10 '16
9 is basically almost frozen already, especially for such a complex change.