Representing the Impractical and Impossible with JDK 10 “var”
While I submitted this, I would like to voice my opinion that I am against &quot;var&quot; in Java. People may ask, &quot;Why should I have to enter in the type if the compiler can infer it for me?&quot; My answer is twofold: 1) You or some other maintainer will need to know what that type is later when reading the code. Of course, &quot;var&quot; is meaningless, requiring you to dig back one or more steps to determine the actual type. 2) You don&#x27;t actually need to enter in the type, any competent IDE can do it for you.<p>So I&#x27;m not sure what we are saving here. When has the time spent typing in code ever been a bottleneck in software development anyways?<p>This is my feeling from having worked extensively in Java as well as languages that support &quot;var&quot;: C# and Swift. I feel like my productivity goes down when I have to support code that uses inferred types. There also seems to be a performance hit when compiling code with inferred typing, although that may be circumventable with better compiler tech, who knows.