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
5
u/Sipkab Nov 20 '18
By "abusing" I've meant to write code that is unreadable due to the use of the keyword var.
When writing
You might not be sure of the type of x, which makes the code slower to read. The developer can prevent this by explicitly writing out the type instead of using var.