3 ms·
in my experience either IO absorbs everything but the most trivial trinkets that I wouldn't ever mess up anyway You mean you never mess up business logic? IO
by runT1ME 10y ago
in my experience either IO absorbs everything but the most trivial trinkets that I wouldn't ever mess up anyway
You mean you never mess up business logic? IO should only really be used when you need to be interacting with the world, IE, network calls, UI, etc.
- daxfohl 10y agoInteresting you ask, because honestly the answer is, not really. In the grand scheme of things, business logic isn't that difficult. Take some data in, process it, output it. And what Haskell provides over C#, an explicit separation of purity and impurity, isn't that great of a help. I design most of my logic to be pure anyway, and when it's not there's a reason for it. Forcing me to jump through hoops to handle those few cases of necessary impurity generally harms more than it helps. "Difficult" code is stuff that involves things like distributed transactions and whatnot. All that stuff has to be bundled in a big wad of IO anyway and so Haskell has nothing to help out with that in the first place (if there was a language that could, I'd be all over it). At least that's my experience. YMMV.