I've been addicted to Rx since I started using ReactiveCocoa in my iOS applications. I was disappointed looking at Dart initially when I saw it was heavily future based and not observable/signal based.
I haven't looked at Dart in awhile but I hope this means Rx style composability/async/error handling is in Dart's future.
Could you explain what you're missing from Rx that isn't already supported by Dart's core library. For example in Dart Iterables and Streams already have: where, skip, take, map, fold, reduce, expand (which is flatMap or mapcat), as well as a few others.
Dart's Stream class is missing many of the composition, transformation and termination methods that you'd find in other FRP libraries. It's also lacking a concept of time-varying values, which to me are important for holding and responding to state changes.
Having functions like flatMapLatest, flatMap, combine, merge, scan, and takeUntil are pretty much essential to building any RX heavy application.
There are some packages out there that extend Dart's streams to add this behavior. One of which I'm the author of, Frappe. Of course, it'd be nice if Dart included this stuff out of the box.
17 comments
[ 5.5 ms ] story [ 65.8 ms ] threadMissing a ( there.
I haven't looked at Dart in awhile but I hope this means Rx style composability/async/error handling is in Dart's future.
https://api.dartlang.org/apidocs/channels/be/dartdoc-viewer/...
https://api.dartlang.org/apidocs/channels/be/dartdoc-viewer/...
https://rx.codeplex.com/
Having functions like flatMapLatest, flatMap, combine, merge, scan, and takeUntil are pretty much essential to building any RX heavy application.
There are some packages out there that extend Dart's streams to add this behavior. One of which I'm the author of, Frappe. Of course, it'd be nice if Dart included this stuff out of the box.
https://github.com/danschultz/frappe
i.e. From docs: "Creates a new stream from this stream that converts each element into zero or more events."
Stream.takeWhile(f) is takeUntil with the return value of the f argument negated.
But sure, you can always add more features to a core library, the difficult decision is when to stop, and leave the rest to libraries.
[I'm a PM on Dart, and would love to learn more.]
Cheers!