4 ms·
Pretty cool! Java has indeed come a long way. Not sure what most people think about the var keyword, but I have to say that I dislike it in a production codeba
by garfieldnate 6y ago
Pretty cool! Java has indeed come a long way.
Not sure what most people think about the var keyword, but I have to say that I dislike it in a production codebase. The example from the article uses var instead of String, only saving two letters, and for classes with longer names var still has the disadvantage of making the code less readable; either you're looking at the code in an IDE and you'll have to click to the method to find out the return type, or you're looking at it on GitHub, etc. and you have to do a manual search to find out the return type. But I'm open to being persuaded otherwise :)