4 ms·
I've personally found it very easy to handle "exceptions" in Haskell. Partial answers feel "bad" in Haskell because all the core functionality is clean enough t
by tel 12y ago
I've personally found it very easy to handle "exceptions" in Haskell. Partial answers feel "bad" in Haskell because all the core functionality is clean enough to not need them, but on the other hand that makes for some of the best tools around for dealing with partiality.
- JadeNB 12y ago> Partial answers feel "bad" in Haskell because all the core functionality is clean enough to not need them Not to need them, sure, but not not to use them. (I swear that's the right number of 'not's.) I don't understand why something like Neil Mitchell's `Safe` isn't just the way that things are done by default.
- tel 12y agoUgh, yeah, total agreement here. Historical accident, I suppose. I try to pretend like `head` and `tail` just don't exist. You can always recognize a file where I'm doing list ops because I define `uncons :: [a] -> Maybe (a, [a])` at the top of the file, haha.
- mightybyte 12y agoEven better than safe, all this has been consolidated very nicely in the errors package.