Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I suspect this was because it was a smaller change. Inferring from the type of the variable to the type of the expression only has the inferred type flowing inwards to smaller scope. Inferring from the expression to the variable gets inferred types spreading out over the whole program.

That is possible, and is how many languages work, but it would have been a huge change for Java. For better or for worse, it's in the nature of Java to be conservative, and not make huge changes.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: