4 ms·
The first part about comparing the callbacks in Javascript vs do notation in Haskell is super misleading. The do notation desguars to code that looks essentiall
by aconz2 10y ago
The first part about comparing the callbacks in Javascript vs do notation in Haskell is super misleading. The do notation desguars to code that looks essentially identical to the Javascript version. Sugar is not a negligible consideration in system choice, but that kinda thing just bugs me.
- hood_syntax 10y agoThat's a very fair point. I actually think in small doses the desugared Haskell looks better, but it gets ugly really quickly.
- gkya 10y agoExcept its not really misleading. The code when you return later you can glance and read is better than that which looks like a landscape rotated counterclockwise.
- efnx 10y agoIt desugars that way beacause of the nested structure of monadic sequencing, not because of threads or IO. We can distill the real argument down to "JavaScript must use nested callbacks for async. Haskell doesn't."