|
|
|
|
|
by Mawr
1516 days ago
|
|
> > in practice, Go seems to have fewer error handling bugs than exception-based languages > > This is based on? By explicitly annotating functions as fallible the language hints to the programmer that errors need to be accounted for. With exceptions, the hints only appear at runtime - when your program crashes. There's nothing that nudges you towards handling errors at the point of writing code, so you end up with brittle software. |
|
I believe a language where instead of subtypes you would get algebraic data types and could optionally mark whether a given exception is checked or not would be the ideal solution.