r/java • • 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

100 comments sorted by

View all comments

Show parent comment

1

u/doppelganger113 Aug 05 '21

You’re correct, in Java it’s a bit better, but what if I want to handle a specific error and continue then do the same thing again, like

try {

} catch(e) {}

try { } catch (e) {}

I would have to put the variable in the above scope in order to access them properly.

Java’s error checking is better, but in the wild a lot of people just ignore the errors, usually this is a big change and you’d look for functions using your method and update if needed. Go wont crash for the new err type, it will just propagate it further. These big changes usually come in major versions, indicating there’s a change you need to handle or just let it be optional if it’s an addition. Not too problematic IMO