Is AngularJS Functional Reactive Programming?

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?


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


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

链接地址: http://www.djcxy.com/p/47720.html

上一篇: 为什么FRP将时间视为价值的一个因素?

下一篇: AngularJS是功能性的无功编程吗?