2011/3/24 Cédric Beust ♔ <[email protected]>

>
>
> 2011/3/24 Kevin Wright <[email protected]>
>
>> (B) Where you can get away with returning maybes/options, you're making it
>>> much harder for code to decide to defer the handling of this error condition
>>> to something up the chain. It's also infectious - if as part of doing your
>>> thing you could run into errors, then you have to turn whatever you return
>>> into an Option/Maybe guard as well. At some point virtually every method
>>> returns option/maybe.
>>>
>>
>> Which is exactly what you want, sometimes, and is *exactly* what checked
>> exceptions do.
>>
>
> Of course not, exceptions also allow someone else than your direct caller
> to handle the error without you having to bubble up this condition manually.
>
>
Exceptions, yes, checked exceptions, no.

As with everyone else here, I have no issue with exceptions per-se, just the
anti-patterns that so often arise around the use of *checked* exceptions.


> --
> Cédric
>
>
>


-- 
Kevin Wright

gtalk / msn : [email protected]
<[email protected]>mail: [email protected]
vibe / skype: kev.lee.wright
quora: http://www.quora.com/Kevin-Wright
twitter: @thecoda

"My point today is that, if we wish to count lines of code, we should not
regard them as "lines produced" but as "lines spent": the current
conventional wisdom is so foolish as to book that count on the wrong side of
the ledger" ~ Dijkstra

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to