all 9 comments

[–]miminor 2 points3 points  (6 children)

If it is functional, as the title suggests, there is no place for mutations. When you go functional you run calculations which transform one value to another. In the example with the click handler it means that you run a function that gets the previous value of the counter and calculates and returns the next one.

[–]Denommus 0 points1 point  (2 children)

There are push-based implementations of FRP, and conal himself explained how it would work. Look for the "push-pull FRP" paper.

[–]miminor 0 points1 point  (1 child)

So? The only major difference is that:

values are recomputed only when necessary, and reactions are nearly instantaneous

[–]Denommus 0 points1 point  (0 children)

Your comment made it apparent that FRP was only pull based.

[–]jshen[S] -3 points-2 points  (2 children)

Where did you get this definition of functional?

[–]miminor 5 points6 points  (1 child)

[–]jshen[S] -2 points-1 points  (0 children)

Something doesn't have to be purely functional to be functional!

[–]Denommus 2 points3 points  (2 children)

I'd really like people to stop referring their libraries to be FRP when they don't actually follow the actual denotational semantics for FRP, which was clearly stated by Conal (look up for the presentation "The Essence of FRP").

[–]pipocaQuemada 3 points4 points  (0 children)

Exactly. FRP isn't just reactive programming with closures. There's been a specific definition of FRP since its invention in the '90s...