[m-dev.] checked exceptions.

Maxime Van Assche mva at missioncriticalit.com
Wed Feb 13 19:41:46 AEDT 2013


On 13/02/2013 00:32, Paul Bone wrote:
>
> How do people feel about checked exceptions?
>

I have mixed feelings about it. Sometimes I wish it was there,
and on the other hand, I am the first one, in java, to re-throw an exception as an unchecked one
to avoid the burden.

On 13/02/2013 03:10, Michael Day wrote:> Hi Paul,
 > In my opinion the use of discriminated union types for return values is one of the strong points of Mercury programming,
 > and checked exceptions would undermine that.

As for DU, it works fine in most cases, but it is a pain for multiple output predicates,
but I also am the first one to throw an error after writing one million times the ok-error disjunction.

Basically, checked exceptions and DU both have pros and cons, but none of them will prevent
lazy people like me to shortcut it, unfortunately.


Max.



More information about the developers mailing list