On 17.09.2012 09:39, Leif Roar Moldskred wrote:
> Robert Klemme <> wrote:
>>
>> My point was not that it can't be made "safe". I rather questioned
>> whether the additional complexity introduced in the language would be
>> beneficial (even if we let compatibility issues aside for the moment).
>
> I don't think there is any additional complexity -- it's just a
> different expression of the complexity that today is expressed through
> the Throwable hierarchy.
No, there is more complexity: you have the class hierarchy and
_additionally_ you define at throwing site how the exception needs to be
handled. With the current language design that distinction is bound to
the exception type while the suggested approach allows to vary handling
per exception type; hence there are more degrees of freedom and
consequently more complexity.
Kind regards
robert
--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/