[mercury-users] Exceptions and unique modes

Peter Ross peter.ross at miscrit.be
Wed Feb 21 23:12:33 AEDT 2001


On Fri, Feb 16, 2001 at 01:36:42AM -0800, Ralph Becket wrote:
> >From Richard A. O'Keefe on 15/02/2001 22:44:14
> >[...much that I agree with...]
> 
> At first I found myself wishing for exceptions to deal with error cases
> when handling IO, but I no longer believe that is the right way to go.
> I still have to check for EOF on every read, so why not errors as well?
> Putting exception handlers in starts to look like more and more hassle.
> 
An interesting point was raised by Paul Massey here at MC, and that is a
predicate should return either a status indicator or throw an exception but
never do both.  So you could argue that the IO predicates should report
EOF as an exception as well or return everything in the status
indicator.

Pete
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list