> Catching exceptions is a bad way to handle errors.
I don't agree. If used properly exceptions are a very elegant way to handle extraordinary conditions and events. Of course we have to ignore the horrible mess Java created with their checked exceptions.
I realized the power of exceptions while I was reading the book UNIX Network Programming by Richard Stevents. I was stuned to see that in some examples most of the code was not implementing the logic, but handling errors. Exceptions would make such implementations very consise and easy to read and comprehend.
> Nowadays there are much better mechanisms of error handling, possible errors should be type-checked at compile-time. Languages that do not use exceptions by default will be ranked higher.
What are they? I don't like the golang aproach each function to return 2 values (result and error code) if this is what the author means.