3 ms·
> I think that Haskell has maybe done a bit of a disservice by making so much hay about using monads for side effects. That's super-important in the context of
by _delirium 11y ago
> I think that Haskell has maybe done a bit of a disservice by making so much hay about using monads for side effects. That's super-important in the context of Haskell, of course, but it gives the unfortunate and false impression that that's what they're really about.
I don't think this is just due to Haskell's specific needs. Monads were originally introduced into computer science as a tool for denoting delimited effects, and many researchers have commented on the close correspondence between monads and effects (in both directions). If you take any given piece of monadic code, you can interpret it as a typesafe way of specifying an imperative computation in a delimited part of the program. Haskell's do-syntax particularly emphasizes this by even making it "look" imperative, but you could still interpret it that way even without the syntax helping you.
Even in the C# example you use, what is .AsParallel() denoting, if not an effect?