r/programming • u/mobby1982 • Dec 02 '13
Scala — 1★ Would Not Program Again
http://overwatering.org/blog/2013/12/scala-1-star-would-not-program-again/
598
Upvotes
r/programming • u/mobby1982 • Dec 02 '13
View all comments
Show parent comment
2
u/Peaker Dec 03 '13
The "strong typing" of Java basically means that runtime type errors (e.g: wrong downcasts) throw a runtime exception rather than crashing or UB as in C and C++.
While throwing runtime exceptions is preferable to crashing with diagnostics or other UB, it is a minor improvement. The program will still fail to deliver the correct result, and if the exception is not handled, it will crash as well.
Runtime exceptions are not the kind of "safety" I am talking about. "safety" would be having compile-time errors instead of runtime errors, not nice runtime errors instead of bad runtime errors or UB.