Question

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?

Was it helpful?

Solution

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

OTHER TIPS

As John Tseng answered, AngularJS is NOT an example of FRP. You can, however, use FRP with AngularJS by using the angular-bacon module.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top