23

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?

4

2 回答 2

16

我不认为它是。Angular 与状态密切相关。事实上,如果你观察一个连续函数,你会遇到无限递归,因为状态总是脏的。

为了使连续函数在浏览器中工作,即使状态是脏的,摘要循环也需要停止。在状态不再脏之前,Angular 不会停止。

编辑

Dart 可用于 FRP:http: //victorsavkin.com/post/55007674849/functional-reactive-programming-in-dart

于 2013-07-25T00:30:17.703 回答
5

正如 John Tseng 所回答的,AngularJS 不是 FRP 的一个例子。但是,您可以通过使用angular-bacon模块将 FRP 与 AngularJS 一起使用。

于 2014-07-31T18:10:53.400 回答