Was recently on a project that just migrated to java 11 (mid august of this year) from java 8.
Someone has started to try to introduce 'var' and is getting push back from others. "it doesn't match current style" and "could be confusing" were some 'concerns'.
When you're trying to do
InternalFormatParserCustomForClientABCDEF customerFormatParser = new InternalFormatParserCustomForClientABCDEF(param1, param2);
you really start to hit readability limits, and formatting things like going over nominal line lengths and such.
var customerFormatParser = new InternalFormatParserCustomForClientABCDEF(param1, param2);
is certainly easier on the eyes, and the compiler can still known and infer what type 'customerFormatParser' is.
Yeah, the same debates happened in C# back when the 'var' keyword was introduced. People just fear change, but once they got hands-on experience they realized the value.
Someone has started to try to introduce 'var' and is getting push back from others. "it doesn't match current style" and "could be confusing" were some 'concerns'.
When you're trying to do
you really start to hit readability limits, and formatting things like going over nominal line lengths and such. is certainly easier on the eyes, and the compiler can still known and infer what type 'customerFormatParser' is.