Is AngularJS Functional Reactive Programming?

Daniel Kaplan picture Daniel Kaplan · Jul 25, 2013 · Viewed 10.5k times · Source

Every time I see the phrase Functional Reactive Programming I realize that I don't understand what it is. I then go back to this question, think I understand what it is, and the cycle repeats later.

Example isn't another way to teach, it is the only way to teach -Albert Einstein

Is Angular an example/implementation of FRP? Why or why not?

Answer

John Tseng picture John Tseng · Jul 25, 2013

I don't think it is. Angular is very much tied to states. In fact, if you watch a continuous function, you'll hit infinite recursion as the state is always dirty.

To make continuous functions work in the browser, the digest cycle needs to stop even when the state is dirty. Angular doesn't stop until the state is no longer dirty.

EDIT

Dart can be used for FRP though: http://victorsavkin.com/post/55007674849/functional-reactive-programming-in-dart