|
|
|
|
|
by lmeyerov
3635 days ago
|
|
Interesting: as far as I can, this is promises, except there is a final strictness point at the end of the composition. That is, in turn, analogous to a one-shot form of old FRP formulations, where there is a final strictness/execute call. We already see that in JS libraries, like 'subscribe' in Rx: https://github.com/Reactive-Extensions/RxJS/blob/master/doc/... FWIW, I'm actually not that thrilled about this sort of deferred approach. In Rx, that is part of the reason 'hot' vs 'cold' documentation has to exist, and I've seen many people struggle with it in theory & practice. |
|
A lot of tough calls had to be made and pragmatic best interest of users typically triumphed over purity.
A promise is monadic if you drop exceptions and use the `then` overload which is `bind`. You have a `pure` - `resolve`.
The promise constructor has to exist to interop with callbacks but for no other reason really.