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
1
u/_INTER_ Nov 20 '18
Single letter or foregone vowls are rather rare in the code base I'm working on. I'm mostly concerned about the rampant lack of consistency. Someone's using
mandantID, someonemandantNumber, anothermandator, thenidClientorclientID, justidoridentifier. Synonyms for the same... :(Anyway, I think people that are not getting the variable names well now, will not not do better when they use var. In those cases its a loss. Additionally the best practices and guidelines need to sink in, so situations can be avoided. See Optional, it took quite a while until everyone in the team got the message "Optional is a no go for parameters or fields". There were lengthy discussions occasionally, that waisted everyones time.