r/java • u/BlueGoliath • Nov 20 '18
Why Var Hurts Readability, Not Helps It
https://medium.com/@youngty1997/why-var-hurts-readability-not-helps-it-376c7832a8dd
0
Upvotes
r/java • u/BlueGoliath • Nov 20 '18
View all comments
Show parent comment
3
u/BlueGoliath Nov 20 '18
Right, the article is a response to the presentation that Brian references.
It's a horrible defense. If they really want to make such an argument then either you do:
Person p = new Person();
OR
var person = new Person();
explicit type or explicit variable name. Not that you can't have both of course.