
An Introduction to Reactive Programming - staltz
https://gist.github.com/staltz/868e7e9bc2a7b8c1f754
======
swanson
I've struggled to grok FRP in the past - I hear lots of smart people
trumpeting it, but I haven't been able to wrap my head around it. This
tutorial was great and I was following along right until it got to the part
about modeling the suggestions as streams
([https://gist.github.com/staltz/868e7e9bc2a7b8c1f754#modellin...](https://gist.github.com/staltz/868e7e9bc2a7b8c1f754#modelling-
the-3-suggestions-with-streams)).

That was where everything went haywire for me - my brain doesn't want to think
about those UI elements as streams and I instantly tune out and think "this
doesn't make sense". I'm curious if anyone else also got stuck at that same
part, as well as if anyone has suggestions/ideas for breaking past this mental
barrier? Is there a different way of solving the same problem (that might make
more sense to me)?

~~~
gulpahum
I was struggling with the way the operators are written:

    
    
      clickStream.map(f).scan(g);
    

Then I realised that map() and scan() are not doing much when that line of
code is executed. They only add a new operation step to a list of operations
for clickStream. Only when an event is received, the saved list of operations
gets executed. So, I think a better naming would have been addMap() and
addScan(), because they only add operators. They don't map/scan anything when
they are called.

I think the best tutorial for me would have been an article explaining what is
going on under the hood. This tutorial does mention this implementation detail
but only very briefly.

Anyway, without the tutorial, I wouldn't have realized this, so it was
actually helpful. :)

~~~
Sharlin
Streams are _lazy_. They work in the same manner as lazy collections in
languages such as Scala and Haskell - if you have an infinite collection, say,
the set of all prime numbers, and do a map operation on it, it does not try to
eagerly execute an infinite loop. Instead, the mapping is only done when when
you actually request any of the elements of the set.

------
eridius
I thought this was a decent tutorial, but I'm a bit annoyed at the double-
click bit. Yeah sure, you can implement some form of double-clicks in 4 lines
of code, but it _behaves badly_. And since the tutorial glossed over it, I
have no idea if this is just because the author doesn't realize they
implemented a really bad click system, or because it takes a lot more than 4
lines of code to do it right and the author didn't like that so chose to
ignore it.

Notably, the single-click stream has a built-in 250ms delay before the click
is fired. That's bad. Similarly, the double-click has a built-in 250ms delay
even if the user clicks twice within 100ms. In fact, it's not just a 250ms
delay from the first click; it's a 250ms delay from the _last_ click before it
finally emits the event.

That's a completely unusable way of doing clicks. If that's how you do clicks
in FRP, then that's a serious issue with FRP. I have to assume there's a
better way, and I'd really like to see it.

The correct behavior is to emit a click event _immediately_ upon a click, but
to remember recent history and associate a click count with the event based on
whether there are recent clicks. So if I click 7 times in a row at sufficient
speed, I should get a click event for every single one, getting 1x through 6x
clicks before finally getting the 7x click on the last one.

~~~
staltz
Sure, you can do that. If it's not how you want it to be, just tweak it.
[http://jsfiddle.net/staltz/U2j4D/8/](http://jsfiddle.net/staltz/U2j4D/8/)

~~~
eridius
Thank you, that behaves a lot better. It seems a bit odd that the
multiClickStream emits a `0` 200ms after the last click, but I guess you can
add the filter to the multiClickStream directly and let the button clear its
own text a different way.

[http://jsfiddle.net/U2j4D/17/](http://jsfiddle.net/U2j4D/17/)

So more than 4 lines of code, but I'm glad to see it's quite doable.

------
davexunit
I am writing a game engine in Scheme that uses FRP. My implementation may not
be robust since I'm the only user, but perhaps seeing what it can do will help
someone. My implementation was heavily inspired by Elm.

Blog post with screencast to demonstrate:

[http://dthompson.us/functional-reactive-programming-in-
schem...](http://dthompson.us/functional-reactive-programming-in-scheme-with-
guile-2d.html)

Implementation details:

[https://gitorious.org/sly/sly/source/8cf0096791821c7711c9dc2...](https://gitorious.org/sly/sly/source/8cf0096791821c7711c9dc2431e4d920f0b678ba:sly/signal.scm)

2048 clone written in a reactive style:

[https://gitorious.org/sly/sly/source/8cf0096791821c7711c9dc2...](https://gitorious.org/sly/sly/source/8cf0096791821c7711c9dc2431e4d920f0b678ba:examples/2048/2048)

Reading the explanation from the Elm folks is what made things click for me:

[http://elm-lang.org/learn/What-is-FRP.elm](http://elm-lang.org/learn/What-is-
FRP.elm)

Edit: Also, SICP has 2 sections that describe systems that are reminiscent of
reactive programming systems.

A Simulator for Digital Circuits:

[https://mitpress.mit.edu/sicp/full-text/book/book-
Z-H-22.htm...](https://mitpress.mit.edu/sicp/full-text/book/book-
Z-H-22.html#%_sec_3.3.4)

Propagation of Constraints:

[https://mitpress.mit.edu/sicp/full-text/book/book-
Z-H-22.htm...](https://mitpress.mit.edu/sicp/full-text/book/book-
Z-H-22.html#%_sec_3.3.5)

~~~
seanmcdirmid
Why not look at Gregory Cooper et. al.'s FrTime? Its the first FRP system I'm
aware of for Scheme, and its quite well used in Racket. It is also a
predecessor of Flapjax.

[http://docs.racket-lang.org/frtime/](http://docs.racket-lang.org/frtime/)

~~~
davexunit
I've read some of this source, too. Thanks.

------
Paradigma11
Names can change over time but here is how i recall it:

FRP is a development based on the work of conal elliott:
[http://conal.net/](http://conal.net/) It's main characteristic is that there
is a continuous (pull)aspect. Since many interesting domains are not
predominantly continuous he and many others had to add a discrete event based
component.

Rx is a stream based technology (push). Basically it is a dataflow library
with modern functional programming syntactic elements. It does not have a
continuous aspect and as such it is not FRP.

By treating Rx as something new we are depriving our self of the dataflow and
structured programming knowledge.

------
alipang
Here's an introduction to Bacon.js, implementing a game with eventstreams, if
anyone is interested in more.

[http://philipnilsson.github.io/badness/](http://philipnilsson.github.io/badness/)

------
xpaulbettsx
A lot of people have reported that they grok Rx* much better once they watch
this talk I gave at [http://vimeo.com/43659034](http://vimeo.com/43659034) \-
if you understand map / reduce / filter as applied to lists (in C#, "Select /
Aggregate / Where"), Reactive Programming isn't too hard to understand if
properly explained.

~~~
seanmcdirmid
Rx isn't really reactive programming so much as slinging event streams around,
there is much more to reactive programming than that (e.g. ReactJS is based on
something completely different).

~~~
vjeux
Before we launched React we had a big discussion as whether we should change
the name or not. React is completely different from everything that's called
"reactive programming" and we were afraid to cause confusion.

~~~
tel
I personally find it causes a lot of confusion. Generally the term "reactive"
has become very buzzwordy and meaningless if late. I think Meijer's talk just
touches on the beginnings of it.

~~~
Paradigma11
I know the stream based RX and several continuous/events based FRP
implementations and their associated problems.

Are there other interesting approaches?

~~~
seanmcdirmid
Well, there is also managed time.

[http://research.microsoft.com/apps/pubs/default.aspx?id=2112...](http://research.microsoft.com/apps/pubs/default.aspx?id=211297)

Constraint and logical systems like Bloom also qualify in dealing with change
(the underlying meaning if "react"). The nice thing about FRP was that it went
way beyond event streams, which is why Rx is so disappointing (which is just
about event streams, react + Rx is sort of FRP).

------
peaton
This is super helpful. The example with the multi-click stream is pretty
impressive as a demo. Is anyone familiar with the Elm[1] language/library that
compiles to JS? Does it facilitate good FRP practice? Or are there any better
libraries/languages out there? I've just seen a lot of Elm when I've google
FRP in the past. (Followed closely by Haskell.)

[1] [http://elm-lang.org/](http://elm-lang.org/)

~~~
seanmcdirmid
Neither Rx nor Elm are FRP. If you want FRP, look at Conal Elliott's work.

~~~
xpaulbettsx
This pedantic distinction isn't useful to anyone, please stop Well
Actually'ing people

~~~
rwosync
It's not a pedantic distinction given how much the term has been overloaded to
refer to dissimilar concepts.

~~~
platz
We should just have separate terms for Discrete vs Continuous flavors instead
of fighting over the one true "FRP"

~~~
seanmcdirmid
It's not just that. Elm and Rx lack continuous value streams at all, they are
completely discrete; also they are very much asynchronous, so they are more
like the event stream manipulation done via data flow in the 70s rather than
what Elliott and Hudak invented in the late 90s.

For something to be called FRP, they at least need both continuous and
discrete abstractions; the simplest description of FRP involves re-evaluation
A + B over time, which is not meaningful in Rx or Elm, really.

~~~
jules
It's meaningful in Elm.

~~~
seanmcdirmid
I would love to see an example. I've browsed Evans' thesis, and it seems like
he explicitly avoids continuous abstractions (behaviors) for event processing.

~~~
jules
Here is an example: [http://elm-
lang.org/edit/examples/Reactive/Position.elm](http://elm-
lang.org/edit/examples/Reactive/Position.elm)

In Elm behaviors and events are the same thing. Usually operations like filter
and fold are only on events, and applicative functor and monadic operations
are only on behaviors, but in Elm one type support filter and fold and the
applicative functor operations, and monadic bind is not supported at all. I
don't think that's good design, but it does mean that Elm has the
functionality of both events and behaviors.

------
prawks
With seemingly more emphasis being placed on complex pub-sub architectures,
has there been any equivalent development of tooling to assist in
visualizing/grokking an existing pub-sub application? In my experience at
least, pub-sub architecture can be difficult to follow without good tooling
(trying to keep all of these coexisting streams in your head when making
changes, as asynchronous code is difficult to write a test suite for that
could catch mistakes). This is somewhat just the nature of asynchronous
programming, but there has been more and more emphasis on that as well with
the popularity of highly responsive GUI applications and more computing
capacity for background tasks.

Aside from using Visual Studio-esque "find references" to navigate to all of
the locations in a codebase where a particular event stream is subscribed to,
I've yet to come across much.

------
heydenberk
It looks to me like Bacon.js is the community favorite and RxJS is the
corporate framework when it comes to JavaScript libraries for FRP. I'm
thinking about introducing an FRP library into the frontend stack where I work
— does anyone have any experience with using either of these libraries (or
another) for corporate work? What did you use and how did your coworkers deal
with it?

~~~
mattpodwysocki
As the primary author of RxJS, I take exception to that characterization.
Anyways, you should look at the performance differences between RxJS and
Bacon.js. They are quite significant!
[https://github.com/pozadi/kefir/blob/master/test/perf/memory...](https://github.com/pozadi/kefir/blob/master/test/perf/memory-
results.txt)

~~~
novaleaf
Hi Matt, fyi the codeplex page doesn't mention what appears to be the primary
website: [http://reactive-extensions.github.io/RxJS/](http://reactive-
extensions.github.io/RxJS/) so you might want to get a link added....

------
nemanja
I also found Martin Odersky's Principles of Reactive Programming Coursera
class [1] very helpful.

[1]
[https://class.coursera.org/reactive-001](https://class.coursera.org/reactive-001)

~~~
X4
I and a friend attended to the class and read several papers, but all you
learn are concepts, tools, paradigms and implementations. There is no
"formula" for creating FRP, it's very generic although highly specific on
monads, (applicative) functors, monoids, etc. So definitively worth a shot, if
you want to learn everything around FRP.

------
TacticalCoder
Great article but there's something I'd like to understand: the article talks
about FRP yet writes _" (Functional) Reactive Programming"_ with "functional"
between parentheses, why?

Is the 'F' in FRP the same 'F' as when people say that, for example, Haskell
and Clojure are FP languages?

Does FRP use the notion of "functions" which are closer to the mathematical
definition of a function? For example does FRP try to avoid state and mutable
data as much as possible and do the same inputs always lead to the same
output? Or is it called "functional" simply because it allows to use things
like map/reduce/filter?

If it is "really" functional, I take it it's quite deterministic: can you then
take all these streams of events and "replay" them at will, always ending up
in the same intermediary state and, eventually, in the same final "state"?

If that's the case, then it's the next thing on my "to learn" list :)

~~~
staltz
> There's something I'd like to understand: the article talks about FRP yet
> writes "(Functional) Reactive Programming" with "functional" between
> parentheses, why?

This comment
[https://gist.github.com/staltz/868e7e9bc2a7b8c1f754#comment-...](https://gist.github.com/staltz/868e7e9bc2a7b8c1f754#comment-1255003)
and this discussion
[https://twitter.com/ReactiveX/status/483625917491970048](https://twitter.com/ReactiveX/status/483625917491970048)

> If it is "really" functional, I take it it's quite deterministic: can you
> then take all these streams of events and "replay" them at will, always
> ending up in the same intermediary state and, eventually, in the same final
> "state"?

Yes. See this [http://debug.elm-lang.org/](http://debug.elm-lang.org/)

------
wolfwyrd
Lee Campbell's book/site is a good place to start -
[http://introtorx.com/](http://introtorx.com/)

------
platz
Some additional overview of different reactive approaches:

[http://www.slideshare.net/deanwampler/reactive-design-
langua...](http://www.slideshare.net/deanwampler/reactive-design-languages-
and-paradigms)
[https://www.youtube.com/watch?v=4L3cYhfSUZs](https://www.youtube.com/watch?v=4L3cYhfSUZs)

* responsive (somewhat hand-wavy - basically, don't block on IO)

* scalable (hard to be scalable - many different approaches)

* resilient (hard to be resilient - erlang is king here)

* event-driven (it's hard to not be event-driven these days)

~~~
mattpodwysocki
The Reactive Extensions covers all of those particular topics quite well, in
terms of responsive to failure, responsive to events, responsive to load etc.

We cover that a bit in our repository with the Reactive Manifesto:
[https://github.com/Reactive-Extensions/RxJS](https://github.com/Reactive-
Extensions/RxJS)

And I've even covered it at StrangeLoop 2013: video:
[http://www.infoq.com/presentations/rx-event-
processing](http://www.infoq.com/presentations/rx-event-processing) slides:
[https://github.com/Reactive-
Extensions/StrangeLoop2013](https://github.com/Reactive-
Extensions/StrangeLoop2013)

As well as FutureJS: video:
[https://www.youtube.com/watch?v=zlERo_JMGCw](https://www.youtube.com/watch?v=zlERo_JMGCw)
slides: [https://github.com/Reactive-
Extensions/FutureJS](https://github.com/Reactive-Extensions/FutureJS)

------
shadytrees
We use ReactiveCocoa [0] extensively at work and can't recommend it highly
enough [1]. (Although admittedly KVO makes Cocoa almost the ideal platform for
reactive programming.)

[0]:
[https://github.com/ReactiveCocoa/ReactiveCocoa](https://github.com/ReactiveCocoa/ReactiveCocoa)
[1]:
[http://ianthehenry.com/2014/5/4/kvo-101/](http://ianthehenry.com/2014/5/4/kvo-101/)

------
newgame
If you're interested in FRP in terms of GUI programming, as described in the
linked article, you should definitely checkout ReactFX [0], an FRP library for
JavaFX, and also the author Tomas Mikula's blog [1] that contains very
convincing examples of FRP's usefulness for real UI tasks [2].

[0]:
[https://github.com/TomasMikula/ReactFX](https://github.com/TomasMikula/ReactFX)

[1]: [http://tomasmikula.github.io/blog/](http://tomasmikula.github.io/blog/)

[2]: [http://tomasmikula.github.io/blog/2014/04/25/combining-
react...](http://tomasmikula.github.io/blog/2014/04/25/combining-reactfx-and-
asynchronous-processing.html)

If you are confused by the term FRP and its different interpretations, I tried
to summarize them in a stackoverflow answer:
[http://stackoverflow.com/questions/22795062/is-it-
possible-t...](http://stackoverflow.com/questions/22795062/is-it-possible-to-
translate-the-mario-example-from-elm-to-either-pure-javafx-
or/23909098#23909098)

------
mjackson
> FRP streams go beyond promises by allowing many returned values. This is
> pretty nice, and shows how FRP is at least as powerful as Promises.

The fact that you can only return a single value from a promise is a feature,
not a limitation. In synchronous code, you can only return once from a
function. In asynchronous promise code, you can only fulfill the promise once.
There's a parallel.

If you want to "allow many returned values" you can just use a callback. You
hardly need a "stream" for that.

~~~
klibertp
> In synchronous code, you can only return once from a function.

Erm, have you heard a term "continuation" or "call/cc" ("call-with-curent-
continuation")? Or "delimited continuations"? Or maybe even "Cont monad"? You
should read on them, if you haven't - they are one of the most fundamental and
_fun_ concepts I encountered.

But even without those, what you wrote here is false in the presence of
generators (which are coming to JS any day now!).

I'd say that returning more than once from function is actually a pretty basic
technique which is widely used to implement quite a wide array of different
things.

~~~
dllthomas
Or, over in C land, setjmp.

------
moondowner
For those searching for Rx examples, I found these:

[https://github.com/fdecampredon/react-rxjs-
todomvc](https://github.com/fdecampredon/react-rxjs-todomvc) (TodoMVC
implementation built on top of React + RxJS)

[https://github.com/eliseumds/react-
autocomplete](https://github.com/eliseumds/react-autocomplete) (React + RxJS
Autocomplete)

~~~
mattpodwysocki
Yep, there are plenty of examples to be found such as those listed here:
[https://github.com/Reactive-Extensions/NDC-
Oslo-2014](https://github.com/Reactive-Extensions/NDC-Oslo-2014)

In addition, we ship a good number of samples within our RxJS repository:
[https://github.com/Reactive-
Extensions/RxJS/tree/master/exam...](https://github.com/Reactive-
Extensions/RxJS/tree/master/examples)

~~~
moondowner
Cool!

------
scotty79
If you want to learn streams the hard way try to implement any non trivial
build process with gulp.js

Just a warrning. Node.js had 3 versions of streams so far and some packages
that implement stream functionality don't all work properly with latest
version. Also two types bytestream and object stream.

~~~
mattpodwysocki
Node.js streams are largely unicast, instead RxJS and related libraries can be
multicast. RxJS, on the other hand has been fairly stable for quite some time
now and the APIs largely haven't changed from when we first released in 2010.

------
latentflip
To add another resource to the list, I gave an introductory talk to bacon.js
and FRP last year which has similar diagrams to these which I animated with d3
if anyone'a interested:
[http://vimeo.com/m/68987289](http://vimeo.com/m/68987289)

------
steveklabnik
I wrote a little FRP library in Ruby:
[https://github.com/steveklabnik/frappuccino](https://github.com/steveklabnik/frappuccino)

~~~
mattpodwysocki
steveklabnik, still working on the Ruby port of Rx. It will get there but
needs more community support.

------
moondowner
RxJava's wiki is also pretty good:
[https://github.com/Netflix/RxJava/wiki](https://github.com/Netflix/RxJava/wiki)

------
canterburry
How is this different from complex event processing (CEP)? High frequency
trading has been using this from day 1.

The real trick is working with historical events and fetch them from disk,
otherwise your reasoning time window is restricted to whatever fits in RAM.

~~~
mattpodwysocki
Using Rx, you can certainly do CEP as we have buffer and window operators, and
the ability to so groupBy and other complex operators. For example we have one
that analyzes stock streams [https://github.com/Reactive-Extensions/NDC-
Oslo-2014/blob/ma...](https://github.com/Reactive-Extensions/NDC-
Oslo-2014/blob/master/demos/WinJS/client/pages/stocks/stocks.js)

~~~
canterburry
So, are you saying Rx is the superset and CEP is a subset of Rx functionality?
What can you do in Rx that you can't do in CEP?

~~~
mattpodwysocki
I would certainly say that Rx has a superset of the operators in standard CEP
which largely deals with buffers and windows, yes. In addition, we have time-
based join and group join behavior, join calculus eg: Rx.Observable.when(
stream1.and(stream2).then(...), stream3.and(stream4).then(...) );

------
X4
There is one thing that really bothers me, I've not found a single a
mathematical formula that defines FRP. The closest thing I've found was the
"Denotational Semantics" showing the logic behind, which is quite lenghty and
leaves a lot of room for variations. I hate descriptions full of buzzwords
that, when you look at it closely have really nothing to do with FRP, but are
mere tools that help realizing it.

Is there someone who can explain us scholars how FRP can be noted down
formaly? Even a link to a page of a paper that shows the formula would be
enormously useful. I'll put all the good papers that I've found in the
footnoes.

\-------- _The following are a few of the good papers on FRP (ordered by subj.
quality). I 've read the Elm paper, but it's vague despite having a lot of
maths in it. What it really decribes is not FRP, but Elm (also it's not
exactly FRP)._

[1] [https://blogs.janestreet.com/breaking-down-
frp/](https://blogs.janestreet.com/breaking-down-frp/) [2] Higher-Order
Functional Reactive Programming without Spacetime Leaks - [https://www.mpi-
sws.org/~neelk/simple-frp.pdf](https://www.mpi-sws.org/~neelk/simple-frp.pdf)
[3] An Axiomatic Semantics for Functional Reactive Programming -
[http://www.wpi.edu/Pubs/ETD/Available/etd-042908-133033/unre...](http://www.wpi.edu/Pubs/ETD/Available/etd-042908-133033/unrestricted/cking.pdf)
[4] Push-pull functional reactive programming - [http://conal.net/papers/push-
pull-frp/](http://conal.net/papers/push-pull-frp/) [5] Categorical Semantics
for Functional Reactive Programming with Temporal Recursion and Corecursion -
[http://www.cs.bham.ac.uk/~pbl/msfp2014/catsemfrp.pdf](http://www.cs.bham.ac.uk/~pbl/msfp2014/catsemfrp.pdf)
[6] Completeness of Conversion between Reactive Programs for Ultrametric
Models -
[http://www.cs.le.ac.uk/people/fdv1/fdv1/Distribution/SeveriD...](http://www.cs.le.ac.uk/people/fdv1/fdv1/Distribution/SeveriDeVriesTLCA2013.pdf)
[7] Fair Reactive Programming - [http://www.cs.mcgill.ca/~acave1/papers/fair-
reactive.pdf](http://www.cs.mcgill.ca/~acave1/papers/fair-reactive.pdf) [8] A
Survey on Reactive Programming - [http://soft.vub.ac.be/Publications/2012/vub-
soft-tr-12-13.pd...](http://soft.vub.ac.be/Publications/2012/vub-soft-
tr-12-13.pdf) [9] Signals, Not Generators! -
[http://www.ioc.ee/~wolfgang/research/tfp-2009-slides.pdf](http://www.ioc.ee/~wolfgang/research/tfp-2009-slides.pdf)
[10] [http://stackoverflow.com/questions/5875929/specification-
for...](http://stackoverflow.com/questions/5875929/specification-for-a-
functional-reactive-programming-language#5878525) [11]
[http://stackoverflow.com/questions/1028250/what-is-
functiona...](http://stackoverflow.com/questions/1028250/what-is-functional-
reactive-programming/1030631#1030631)

 _The bad thing about all those papers is that a) you need to know Category
Theory, b) Temporal Logic, c) Denotational Semantics d) (and optionally Henkin
and Ultrametric Models) Unfortunately I 'm not yet that smart :( hope someone
can bring clarity into FRP_

Sorry for the ugly footnote, that's the best I got using HN's formatting
capability.

Update: I used unicode spaces, that fixed it.

~~~
tel
Push-pull is one of my favorites, but it's pretty "operational".

------
CmonDev
"Javascript is the most familiar language out there at the moment"

Will people ever stop using this reasoning? Why not pick the best/better
language instead?

~~~
jrajav
Because the goal here is not to write the most efficient and most maintainable
code, but to demonstrate a new concept. Familiarity and availability are more
relevant in this case than "best language," however you'd measure that.

~~~
derefr
Hmm. Java might be known by more, if just from the fact that those who take an
introductory CS course as an elective in another major will get their lessons
in it. But, as a _lingua franca_ , it sucks even worse.

Mind that term, actually: while French itself was just an average European
language, it was handy, for political reasons, for diplomats of all stripes to
pick up—and somewhat easy, presuming you had studied texts in Latin. JS is
much the same: a lot of us might not prefer it when writing our own code, but
we can all certainly read it, given its ALGOL derivation, and it's certainly
more pithy than, say, C, for communicating the kind of concepts we need to
communicate (like FRP.)

~~~
Terr_
> But, as a lingua franca, it sucks even worse. Mind that term, actually:
> while French itself [...]

Mind that term even more, because despite the similar "fr--" sound, it does
not actually denote the French language.

"Lingua franca" is actually an Italian term for "Frankish language", during a
time (post-middle-ages) when "Franks" often referred to Western Europe in
general.

While French is an example of a language which fit the definition for a period
of time, it is not the source of its name.

------
_pmf_
> So you're curious in learning this new thing called (Functional) Reactive
> Programming (FRP).

Chaining is the new goto. Abused, it causes deeply anti-modular, temporally
coupled code, which is really really ugly to maintain (good thing rockstar
ninja programmers only need to think two weeks ahead).

~~~
Ixiaus
You are confusing "chaining" with "composition". The two have fundamental
differences. This confusion is understandable though because languages without
a strong type system make _true composition_ very loose (the exception being
stack based languages, I think).

Javascript is a poor language for composition; stream programming is uniquely
suited to strongly typed languages with denotational semantics that make
function composition natural and you'll probably be seeing much more of Elm
and other Haskell to Javascript compilers taking the stage for this.

