Reactive Programming in JavaScript
engineering.silk.co
engineering.silk.co
Although the implementation is different, I tried to keep the interace similar in spirit. Building a Haskell version of a JavaScript library on the side really helps validating your design decisions.
Question (and opening a can of worms) - if I'm looking to learn more about FP, should I go for Haskell or Clojure?
Haskell is worth learning because a lot of the work done in FRP has been done in a Haskell mindset. Flapjax, Fran, reactive-banana, Elm---all are written in Haskell or trace significant ancestry therefrom.
Clojure is worth learning because, well, it's the future, but also because the community seems to be bent on finding actual application for lofty CS concepts. If you want to use facebook's React, you can use JS, coffescript, facebook's "JSX" compiler, or clojurescript. I'd argue that clojurescript is the most pleasant option.
If you want to learn about FRP inside and out, Haskell. If you want to write something cool and reactive, Clojure.
(Other names to look at if you go clojure: Shafty, Javelin, Lamina, core.asynchronous)
The set and get methods are there to go from the JS world to the reactive world and back. Usually you're working with reactive variables (as if they were actual values) directly, in that case you won't use get and set at all.
In angular, there are no setters/getters, you just set values the vanilla way... val = newVal; Angular keeps a reference and a copy of all the watched variables, checks for a change during the 'digest' cycle, and triggers events accordingly. It's not completely for updating the DOM. The syntax for Reactive looks cleaner (I guess ES6 helps a bit).