To throw or not to throw [was: Go Programming talk [OT]]

Jer jersey at chicago.com
Thu Jun 10 21:48:24 PDT 2010


Leandro Lucarella wrote:
> Leandro Lucarella, el  9 de junio a las 11:37 me escribiste:
>> Pelle, el  9 de junio a las 13:28 me escribiste:
>>>> Yes, I agree that "safety" is the best argument in favour of
>>>> exceptions (as explicitness is the best argument in favour of
>>>> no-exceptions). The Python Zen put it this way:
>>>>
>>>> Errors should never pass silently.
>>>> Unless explicitly silenced.
>>>>
>>>> That's what I like the most about exceptions. I think try/catch is
>>>> really ugly though. There has to be something better.
>>>
>>> Careful use of scope(exit) and simply avoiding catching exceptions
>>> works well for me. Except when you have to catch, of course. :)
>>
>> I'm talking precisely about the case when you have to catch. In that
>> case I think the resulting code is uglier and more convoluted than
>> the code to manage errors by returning error codes or similar.
>
> BTW, here is a PhD thesis with a case against exceptions. I didn't
> read it (just have a peek) and it's rather old (1982), so it might be
> not that interesting, but I thought posting it here as the thread
> became mostly about exceptions and someone might be interested =)
>
> http://web.cecs.pdx.edu/~black/publications/Black%20D.%20Phil%20Thesis.pdf

Thanks. I was feeling kinda lonely. Circa 1982, np. 




More information about the Digitalmars-d mailing list