[Haskell] Better Exception Handling
John Goerzen
jgoerzen at complete.org
Tue Nov 23 10:51:56 EST 2004
On Tue, Nov 23, 2004 at 04:30:21PM +0000, Keean Schupke wrote:
> I am sure this discussion has happened before, but I think for pure
> functions, returning Either Error Result is the way to go.
That's certainly possible, but extremely tedious.
One example: I've written an FTP client library. For every operation,
there are several possible outcomes... mainly: success, low-level
network error, or server error.
Having to pick apart an Either from every command to CD, set transfer
types, etc. would get so tedious that the code would, I think, become
spaghetti fast.
-- John
More information about the Haskell
mailing list