-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
Description
by rblaak:
I understand the tradeoffs explained in the language spec. However, in a modern language, the lack of an ability to abort control flow leads to very poor coding styles. It results in an error result code programming style that is very fragile, since callers have to be disciplined to pay attention to result codes. It is also more work to continuously pass errors up the call chain. With exceptions, errors cannot be ignored by accident, and that leads to better code by default. You are taking the trouble to implement garbage collection. The same reasons apply to having an exception mechanism: it relieves tedium from the programmer, and makes code safer. Use .NET or C++ as a guide for exceptions, not Java. Checked exceptions tend to force naive programmers to catch and swallow them to shut up the compiler, which leads to the worst of all possible worlds: errors that are silently ignored.