3 ms·
Promises are to Streams what single values are to arrays/collections. Promises are all fine and dandy for "do this, wait for that, do that", but they are not p
by dtech 10y ago
Promises are to Streams what single values are to arrays/collections.
Promises are all fine and dandy for "do this, wait for that, do that", but they are not powerful enough to express "every time this happens, do that".
I guess you're coming from a JS background as you are using the word "Promises". Imagine instead of registering a callback for mouse click events, you have a stream of mouse events where you can listen to. This is exactly how it works in Angular 2 [1].
[1] http://blog.rangle.io/observables-and-reactive-programming-in-angular-2/ http://blog.rangle.io/observables-and-reactive-programming-i...