[m-dev.] checked exceptions.

Paul Bone paul at bone.id.au
Wed Feb 13 13:43:39 AEDT 2013


On Wed, Feb 13, 2013 at 01:10:31PM +1100, Michael Day wrote:
> Hi Paul,
>
>> How do people feel about checked exceptions?
>
> Vehemently opposed :)
>
> 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.
>
> Since it would be a new complex addition to the type system, it needs a  
> very strong motivation to justify adding it.
>
> What is the reason for considering this feature?

I'm glad you asked in this way.

Because not everone uses DU types the way they _should_ be used.  So if we
have DU types people should use them and shouldn't need these types of
exceptions.

Between your e-mail and Micheal Richter's e-mail I'm thinking that something
more like ocamlexp is the right way to go.


-- 
Paul Bone
http://www.bone.id.au



More information about the developers mailing list