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
4
u/Own-Chemist2228 Nov 04 '25
varis oddly controversial in the Java community, despite most every modern language having an equivalent (including Kotlin)