> Exceptions have an implementation cost, and many other features are affected 
> by the presence of exceptions. I'm not ready to argue against them, but I 
> think "Hey, you don't like them, don't use them!" is not a good way to think 
> about language design.

Cost compared to what? The cost can be exactly C's `if (err) goto 
errorHandler;` after a call that can fail, or the cost can be less than that 
which the table based implementation or if you use a hardware flag. These are 
the facts and language design based on facts is always a good idea. And again, 
I don't like exceptions myself, but I have yet to read arguments against them 
that hold water. And no, you don't need to quote 
<http://joeduffyblog.com/2016/02/07/the-error-model>/ as that is unconvincing. 
You don't believe me? So read the **whole thing** , esp. when he talks about 
"abandonment":

> Parts of our system were of course “hardened” in a sense, like the lowest 
> levels of the kernel, where abandonment’s scope would be necessarily wider 
> than a single process. But we kept this to as little code as possible.
> 
> For the rest? Yes, you guessed it: abandonment. Nice and simple.
> 
> It was surprising how much of this we got away with.

So ... in other words, exceptions really do work. And indeed both Ada and 
Erlang offer exceptions. I'm sorry but complaining about exceptions feels like 
a silly fad to me.

> And yes, we're back to the question of "lots of minor breaking changes" vs 
> "fewer, larger ones". One path leads to despair and utter hopelessness. The 
> other, to total extinction. Let us pray we have the wisdom to choose 
> correctly.

So ... do you happen to know which path leads to which outcome?

Reply via email to