> I am pretty sure [working around checked exceptions] will never be a part of the JDK, because it is arguably bad for large and serious programs.
And yet so many programming languages, including JVM languages like Scala or Kotlin, just don’t do checked exceptions, and the world hasn’t caught fire yet (and in fact, I can’t think of another mainstream language that does have them). Java could just drop them altogether and everyone (except maybe the most devout Java fans) would be happier.
> The file gets compiled on the fly, every time that I run the script. And that's just the way I want it during development or later tinkering. And I don't care during regular use because it's not that slow. The Python crowd never loses sleep over that, so why should I?
Java takes significantly longer to compile than Python does. My Python takes ~40 ms at first startup of a hello world script, ~20 in later attempts. `java hello.java` is in the 360-390 ms range.
Checked errors are not unique to Java. Rust, HNs darling baby, is praised on this forum every day for checked errors. Swift, F# and countless other languages have checked errors.
There is nothing wrong with checked exceptions and there is really no difference between a Result and a function with a checked exception.
The issue is not with checked exceptions but with Java’s syntax. They have not given programmers the language syntax to easily deal with checked exceptions. You cannot easily escape them without boilerplate and they don’t work correctly across lambdas. This is why Rust ships with ?; Swift has shipped with try!, try?; and Scala ships with try as an expression and is experimenting with checked exceptions that work across high order functions [0].
Programmers across every language ecosystem are moving towards checked errors and away from unchecked runtime crashes. Even Kotlin, a language that shipped with unchecked errors, is planning on adding a form of checked error handling [1].
And yet so many programming languages, including JVM languages like Scala or Kotlin, just don’t do checked exceptions, and the world hasn’t caught fire yet (and in fact, I can’t think of another mainstream language that does have them). Java could just drop them altogether and everyone (except maybe the most devout Java fans) would be happier.
> The file gets compiled on the fly, every time that I run the script. And that's just the way I want it during development or later tinkering. And I don't care during regular use because it's not that slow. The Python crowd never loses sleep over that, so why should I?
Java takes significantly longer to compile than Python does. My Python takes ~40 ms at first startup of a hello world script, ~20 in later attempts. `java hello.java` is in the 360-390 ms range.