TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What is reactive programming?

67 pointsby outdooriconalmost 11 years ago

9 comments

telalmost 11 years ago
The linked Stack Overflow answer by Conal Elliott does a much better job explaining FRP. It has less to do with "linking" as via this destiny operator and more to do with manipulating values of "entire histories and futures" all at once. In other words, the heart of FRP is not in the operators, but the nouns. And not in an OO sense tied to ambient mutation, but instead as concrete, immutable values.
评论 #8172897 未加载
评论 #8172757 未加载
kazinatoralmost 11 years ago
This gives me an great idea. What if we put these variables into a grid displayed on the screen? Then you will be able to enter some values into some of the cells, and the dependent ones update themselves automatically. The elements of the grid could be regarded as array elements indexed by coordinate, and use relative or absolute addressing to refer to each other's coordinates, making it easy to replicate dependency rules across rows and columns, to generate entire tables which update themselves.
评论 #8172869 未加载
评论 #8172841 未加载
评论 #8172746 未加载
评论 #8173367 未加载
评论 #8172790 未加载
ggurgonealmost 11 years ago
Netflix uses reactive programming massively <a href="https://www.youtube.com/watch?v=XRYN2xt11Ek" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=XRYN2xt11Ek</a>
评论 #8172620 未加载
davexunitalmost 11 years ago
I&#x27;ve been slowly implementing my own functional reactive programming system over for a game engine I&#x27;m writing. A few months ago, I wrote a short blog post on the topic that includes a screencast to see how it all works. Maybe it will help someone understand (F)RP a bit better.<p><a href="http://dthompson.us/functional-reactive-programming-in-scheme-with-guile-2d.html" rel="nofollow">http:&#x2F;&#x2F;dthompson.us&#x2F;functional-reactive-programming-in-schem...</a>
评论 #8172518 未加载
ef4almost 11 years ago
The &quot;destiny&quot; operator is just function definition. It might seem different if you&#x27;re only used to languages where function calls and variable accesses are syntactically distinct.
评论 #8172548 未加载
michaelsbradleyalmost 11 years ago
I enjoyed the post, but I think the proposed scope of reactive programming is a bit limited. What the author describes is, I think, more related to the concerns of &quot;bidirectional programming&quot;[1] and lenses[2]. Granted, I think those concerns do fit broadly under the umbrella of reactive programming.<p>Below is Prof. David Harel&#x27;s (the inventor of statecharts, formalized as UML State Machines) general characterization[3] of a reactive system; reactive programming would then be any programming methodology, language or environment which aims to service those characteristics.<p>* It continuously interacts with its environment, using inputs and outputs that are either continuous in time or discrete. The inputs and outputs are often asynchronous, meaning that they may arrive or change values unpredictably at any point in time.<p>* It must be able to respond to interrupts, that is, high-priority events, even when it is busy doing something else.<p>* Its operation and reaction to inputs often reflects stringent time requirements.<p>* It has many possible operational scenarios, depending on the current mode of operation and the current values of its data as well as its past behavior.<p>* It is very often based on interacting processes that operate in parallel.<p>[1] <a href="http://www.cs.cornell.edu/~jnfoster/papers/jnfoster-dissertation.pdf" rel="nofollow">http:&#x2F;&#x2F;www.cs.cornell.edu&#x2F;~jnfoster&#x2F;papers&#x2F;jnfoster-disserta...</a><p>[2] <a href="http://www.cis.upenn.edu/~bcpierce/papers/lenses-etapsslides.pdf" rel="nofollow">http:&#x2F;&#x2F;www.cis.upenn.edu&#x2F;~bcpierce&#x2F;papers&#x2F;lenses-etapsslides...</a><p>[3] <a href="http://www.wisdom.weizmann.ac.il/~harel/reactive_systems.html" rel="nofollow">http:&#x2F;&#x2F;www.wisdom.weizmann.ac.il&#x2F;~harel&#x2F;reactive_systems.htm...</a>
cpralmost 11 years ago
<a href="https://gist.github.com/staltz/868e7e9bc2a7b8c1f754" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;staltz&#x2F;868e7e9bc2a7b8c1f754</a> is an excellent introduction to reactive programming.
RyanMcGrealalmost 11 years ago
Wait, we&#x27;re still using semicolon line terminators in 2051?<p>Sigh.
评论 #8176375 未加载
评论 #8173159 未加载
factorialboyalmost 11 years ago
Reactive = Responding to (often asynchronous) events
评论 #8172982 未加载