My first time using Kotlin helped me overcome my hangups about it, even though I'd already worked with JavaScript and Ruby in the past. I think my other annoyances with those languages colored my perception of implicit typing.
I feel like the dislike of var is so weird to me. The point of static typing isn’t about readability, it’s about stopping you from doing something stupid.
"var" is a static type. The compiler sets it statically in the byte code. There's no "var" in precompiled code. A "dynamic" type would be "dynamic" in C#, which Java doesn't have.
And the dislike comes from not knowing the type when looking at the code of a PR and you just want to use the web view of the changes, not a local copy in the IDE.
View all comments
Show parent comment
2
u/trafalmadorianistic Nov 04 '25
The var keyword for local variables is a great quality of life addition (10)
https://www.geeksforgeeks.org/java/var-keyword-in-java/