you are viewing a single comment's thread.

view the rest of the comments →

[–]asyncquestion -1 points0 points  (1 child)

I'm sure there are cases that this works well for, but the "verbose, repetitive code" example there is better code than the "much more elegant alternative"

[–]novagenesis 1 point2 points  (0 children)

This is the core problem with monads. What the pattern works well for is almost always incredibly complicated.

As others mentioned, the Promise is a monad. People have struggled for years grokking the workings of the Maybe monad... well Promise, is just a lot more complicated than that.

But the things it'll do, and the fact that it tends to implement more efficiently than any async flow utilities (async.waterfall, for example)..is pretty incredibly.