News for hackers. Stuff that matters.
Re:Rating 26 years of Java changes by CrimsonRain on Saturday October 11, 2025 @06:52PM (#45553362)
1. Just because you can use var in a place, doesn't mean you should. Use it where the type would be obvious when reading code like

  var myPotato = new PotatoBuilder.build();
not like

  var myFood = buyFood();
where buyFood has Potato as return type.

2. Even if you don't follow 1, IDEs can show you the type like

  var Potato (in different font/color) myFood = buyFood();

There are no comments on this comment yet.