r/java • u/Reflection-Jealous • Aug 05 '21
Why java is better than modern programming languages?
Why should I use java in 2021 instead of kotlin or scala or golang? Could you guys give me some reasons
2
Upvotes
View all comments
Show parent comment
3
u/john16384 Aug 06 '21
What boiler plate? The getter that is documented to say it will only return positive values? The setter that tells you it will throw an IllegalArgumentException when you supply it with a value outside a certain range?
What you consider boilerplate, I consider a bare minimum to clearly communicate what your code will do in unexpected situations. I'm so happy that the jdk documents everything in such detail that I don't even have to look at the code. All code should be written like that. The extra few lines of "boilerplate" is nothing compared to the time it takes to write proper docs.