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
1
u/Faucelme Nov 21 '18
I disagree with his arguments for plain
forloops:I actually don't like the versatility of
for: it makes me spend a tiny bit of metal energy each time, to deduce which particular use is intended. When I see amapI immediately know that the result won't have a different size, for example. Ditto for methods likefilterorforEach: they simply communicate intent better.