Talk:Reactive programming
![]() | Computing Start‑class | |||||||||
|
![]() | Computer science Start‑class | ||||||||||||||||
|
Spreadsheet?
Is a spreadsheet considered a reactive programming environment?[1] --Damian Yerrick (talk | stalk) 15:39, 28 September 2007 (UTC)
I think so; it seems to fit the definition, and libraries like Trellis (in the external links) explicitly use the metaphor of spreadsheet cells. Perhaps reactive programming is only the jargonization of a not particularly new way of thinking? --Kiv (talk) 21:50, 27 July 2009 (UTC)
Hardware Description Languages?
When I read this paragraph:
"For example, in an imperative programming setting, a: = b + c would mean that a is being assigned the result of b + c in the instant the expression is evaluated. In reactive programming it could instead mean that we set up a dynamic data-flow from b and c to a. whenever the value of c or b is changed, then a is automatically updated."
I immediatly thought, "Verilog?" —Preceding unsigned comment added by 15.252.0.75 (talk) 20:41, 26 June 2008 (UTC)
I thought the same thing, after I thought "Microsoft Excel"? Perhaps reactive programming is a garden-variety technique under an obscure name?-- Kiv (talk) 21:53, 27 July 2009 (UTC)
Can add jQuery?
See this jsFiddle EXAMPLE of A=X+Y
where X
and Y
updates A
.
function setA(){ // A=X+Y as integers
var A = parseInt($('#X').text()) + parseInt($('#Y').text());
$('#A').text( A );
}
setA(); // for inicial value of A
$('#X,#Y').css('cursor','pointer').click(function(){
// by reaction to a click: updates A and X or Y
var obj = $(this);
obj.text(parseInt(obj.text())+1);
setA();
});