|
Subject: There are too many error handling conventions used in library code! Newsgroups: gmane.comp.lang.haskell.libraries Date: 2007-03-11 00:33:57 GMT (1 year, 25 weeks, 6 days, 17 hours and 45 minutes ago)
This article on the 8 different error handling strategies various common
Haskell libs use:
http://www.randomhacks.net/articles/2007/03/10/haskell-8-ways-to-report-errors
got me thinking:
we need to standardise/recommend a small set of methods for library
error handling.
The lack of consistent error reporting between libs results in verbose
code, as we're not able to use a single error handling technique when
gluing together code from different libs (i.e. we can't just use Maybe
or Either/ErrorT).
(It's always nice when you *can* use, say, a Maybe monad to glue code
from a number of sources, but eventually you reach code with a different
error system, and the Maybe monad breaks down).
So, some questions I think we can tackle:
* can we identify error handling strategies from the list that should
not be used anymore? (throwDyn?)
* can we move some of the outlying libraries to a more consistent error framework?
* do we need more support for gluing together our different error systems?
(it should be easier to glue code using , say, Maybe/Either).
* what role does MonadError play here, as a generic error handler?
* can we make precise recommendations about which error strategies to use?
-- Don
|
|
|