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?

2
  • 2
    If this question is too broad, then I don't see how you can ever ask anything about FRP without the same problem. Jul 25, 2013 at 17:04
  • AngularJS is NOT a programming language, rather a Framework :-)
    – P.M
    May 10, 2016 at 14:43

2 Answers 2

16

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

3
  • @tietyt Added a reference to Dart for FRP
    – John Tseng
    Jul 26, 2013 at 2:09
  • 3
    It would be good to at least clarify for the op that although angular.js may not be fully FRP base on your assertions, it is at least reactive programming. Aug 31, 2013 at 17:48
  • I disagree, so many frameworks have something reactive like angular.js to be meaningless.
    – Joel
    Dec 29, 2013 at 3:22
5

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.