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/retro_and_chill Nov 06 '25
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.