[m-dev.] cc_multi or det ?

Ralph Becket rbeck at microsoft.com
Tue Aug 7 02:31:57 AEST 2001


> From: Holger Krug [mailto:hkrug at rationalizer.com]
> Sent: 06 August 2001 17:21
> 
> Ralph asked me three times ("please, please, please"), to agree with
> this, so I have to.

Yay!

> As a Java programmer I started to like exception, because they clearly
> separate expected and unusual behavior. As Mercury programmer I have
> to use them very cautious, because catching them is 'cc_multi'. So one
> further question:

That's interesting.  I conducted an informal poll among my friends
and colleagues (who span the space from academics to commercial
programmers, functional advocates to die-hard imperative types) about
exception usage and they almost exclusively said they felt exceptions
were to be avoided wherever possible.  The concensus was that handling
exceptions was as hard as handling error codes, but with a wider scope
for introducing bugs.

It sounds like your experience has been different: could you elaborate?
People's good experiences with such things often indicates good points
in the design space.

> why don't we use `cc_multi' anywhere where we otherwise would use
> `det' ? Are there performance issues or is it only because of a
> mismatch between declarative and operational semantics ?

I believe its the latter, although there may be some optimizations
that can't be performed depending upon the semantic model the compiler
is working under.

- Ralph
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list