DEV Community

Discussion on: We should write Java code differently

 
siy profile image
Sergiy Yevtushenko

Here is the detailed explanation with examples: 4comprehension.com/kotlin-type-inf...

And yes, in most cases type inference makes code cleaner without loosing context.

As for formatting. Formatting affects readability, but it should be extremely weird to cause loss of context. And as long as context is preserved, getting used to particular formatting style is just a question of time. Developer may still hate formatting, but once he/she is get used to it, formatting is no longer an issue.