Posted by Jakub Holý on June 17, 2015
By Matthew Podwysocki
Lot of work (setup, remove listeners …), not composable.
No way to abort promise in progress. (Me: has to remember to check for errors:
No try-catch-finally; only try-catch.
Node: Stream 1 were terrible (pause/resume unusable, data sent before ready, …).
Streams 2: A lot to trip over. Streams 3: Similar.
- focused on low-level I/I, not on object mode
- Think Node Streams + Promises
Behavior: values over time
Event: discrete phenomena with a value and a time
“The majority of your asynchronous code is written with just a few flexible functions.”
The general theory of reactivity
^ multiple values | iterable observable single value | value promise ----------------------------------> sync async
Observables: No need for low-level programming, combine existing powerful primitives (
Async/Await a la C#?
- for promises
Dart: Async progr. with futures and streams
Futures = promises, streams unify IO and events, mirrors Rx by adding map/… .
Observables coming to ES2016
- http://rxmarbles.com/ – visual presentation of fns
- visual debugger for async code with Rx:
- RxJS Pacman game ex.: https://github.com/Reactive-Extensions/RxJS/blob/master/examples/pacman-unicode/index.html (and http://www.sitepoint.com/building-pacman-with-bacon-js/)
Sorry, the comment form is closed at this time.