Problem
Some people like to use the var keyword everywhere. Usually these people don't care about reviews.
Because it's always cool to read the following as a reviewer (without an IDE):
vardeliveryState = deliveryDao.find(...); // dozens of lines of codedeliveryState.id(); // It's a DeliverState entityvarsendState = sendDao.find(...);
// dozens of lines of codesendState.isEmpty() // Surprise it's an Optional. // How can you tell without an IDE? // Answer: YOU CAN NOT!
Widespread usage of var effectively makes Code Reviews via Web UIs very hard.
var can be tolerated if it's used on very long Types descriptions (e.g. Map.Entry<MySuperCoolCacheKey, MySuperCoolValue> entry) with good variableNames however otherwise I see no reason why it should be used in the first place, because IDEs have automatic variable extraction capabilities that automatically extract the correct type:
→ 
See also: OpenJDK's Local Variable Type Inference CSG
Proposed solution
Prevent the use of var in general or if the total type description length is below a certain limit (somewhere around 30 chars)
Problem
Some people like to use the
varkeyword everywhere. Usually these people don't care about reviews.Because it's always cool to read the following as a reviewer (without an IDE):
Widespread usage of
vareffectively makes Code Reviews via Web UIs very hard.varcan be tolerated if it's used on very long Types descriptions (e.g.Map.Entry<MySuperCoolCacheKey, MySuperCoolValue> entry) with good variableNames however otherwise I see no reason why it should be used in the first place, because IDEs have automatic variable extraction capabilities that automatically extract the correct type:See also: OpenJDK's Local Variable Type Inference CSG
Proposed solution
Prevent the use of
varin general or if the total type description length is below a certain limit (somewhere around 30 chars)