3 ms·
But F# doesn't have async/await. As you write, it has "computation expressions", which are inspired by Haskell's "do-notation", but are more generalised and pow
by sideeffffect 6y ago
But F# doesn't have async/await.
As you write, it has "computation expressions", which are inspired by Haskell's "do-notation", but are more generalised and powerful (than both Haskell's "do-notation" or Scala's "for-comprehension", let alone async/await).
One of the things I liked best about F#.
- daxfohl 6y agoIdk if you can strictly say that. Haskell allows more generalized do blocks because of HKTs. I blogged about this a few years ago. https://www.sparxeng.com/blog/software/higher-kinded-fun-in-haskell https://www.sparxeng.com/blog/software/higher-kinded-fun-in-.... (Granted, I've never had a use for that beyond code golf). And C# is nice because you can await anywhere in an expression instead of just at a "let!" declaration. This is something I do miss when using F#. But agreed, F# is usually my language of choice.
- daxfohl 6y agoI think the Haskell abstraction is what allows monad transformers. Saw some hacks in F# to allow similar, but you lose generic "lift", for instance.