6 ms·
Spicing Up Dart with Side Effects
- tosh 12y agoExciting to see Erik Meijer (Haskell, C#, Hack, LINQ, Rx) as co-author of this article.
- mark_l_watson 12y agoAgreed. I took his edX functional programming class mostly Haskell) and it was great fun.
- TazeTSchnitzel 12y ago> I took his edX functional programming class mostly Haskell) Missing a ( there.
- long 12y agoHe said he learned Haskell, not Scheme :)
- myko 12y agoI'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.
- tosh 12y agoYou might like `frappe` https://github.com/danschultz/frappe https://github.com/danschultz/frappe a bacon.js inspired library for Dart.
- xxgreg 12y agoCould 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. https://api.dartlang.org/apidocs/channels/be/dartdoc-viewer/dart:async.Stream https://api.dartlang.org/apidocs/channels/be/dartdoc-viewer/... https://api.dartlang.org/apidocs/channels/be/dartdoc-viewer/dart:core.Iterable https://api.dartlang.org/apidocs/channels/be/dartdoc-viewer/... https://rx.codeplex.com/ https://rx.codeplex.com/
- spankalee 12y agoTo me the only thing that's missing is a Property object - a Stream with a current value. I've ended up implementing it a few times already.
- danschultz 12y agoDart'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. https://github.com/danschultz/frappe https://github.com/danschultz/frappe
- xxgreg 12y agoI thought Stream.expand(f) is flatMap. 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.
- seanmcdirmid 12y agoNote that Erik Meijer was also one of the guys behind LINQ and adding generators to CLR languages when he was at Microsoft.
- dzenanr 12y agoDart is in good hands.
- skybrian 12y agoIt would be nice to see a followup about performance considerations.
- frowaway001 12y agoJust when people thought that we had one less useless language to deal with ...
- brentis 12y agoWe are building a realtime app with Dart. So far it's silky smooth for most part.
- sethladd 12y agoAny chance you can share more details? You can send me a message with @sethladd or plus.google.com/+sethladd [I'm a PM on Dart, and would love to learn more.] Cheers!
- mentaat 12y agodart is awesome but does anyone know the status of embedding dartvm into chrome. surprisingly i don't hear google talk about this a lot...