Talk:Reactive programming

Latest comment: 3 years ago by Reinis in topic Spreadsheet?

Reference 5 appears to be spam edit

Reference 5 (The Art of Service) contains a copy of the Wikipedia content surrounded by adverts. — Preceding unsigned comment added by GeraldByrne (talkcontribs) 21:40, 9 October 2016 (UTC)Reply

Spreadsheet? edit

Is a spreadsheet considered a reactive programming environment?[1] --Damian Yerrick (talk | stalk) 15:39, 28 September 2007 (UTC)Reply

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)Reply

This article used to have a section about the similarities with spreadsheets, but not sure what's happened to it, and there seems to be no discussion of it here. Reinistalk 10:26, 9 December 2020 (UTC)Reply

Hardware Description Languages? edit

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)Reply

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)Reply

Can add jQuery? edit

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();
 });

Imperative example? edit

The jQuery code above looks strictly imperative. It's very much like all other DOM-manipulation jQuery code I've seen. You are wiring a click handler, and in that handler calling a procedure (function) to do some DOM manipulation. setA() specifies how to update A (e.g. statements to update state, which in this case is the text of A) rather than any code in the example specifying that A's text should always be the sum of X and Y. — Preceding unsigned comment added by 128.187.112.10 (talk) 20:43, 3 July 2017 (UTC)Reply

Section "The need for reactive programming" edit

As of June 6 '14, this section is just garbage, written as if it were a salespitch from someone trying to sell a reactive programming system, and talking about "few years back" and "nowadays." Citations? Forget about it. Maybe someone really ripped it off of some marketing-oriented page advertising a reactive programming system. Talking about the "need" of a programming paradigm is somewhat un-neutral in first place; one should rather speak about its "motivation" as in what problem it tries to solve, which will generally have many other possible solutions, and this is explained otherwise in the article anyway, so I'd go forth and say that this section could be removed entirely. When I did so, someone undid the change saying "no blanking please" so I just added an "essay entry" template to it for now... -- Taylan

Just realized it's indeed ripped off of the site http://www.reactivemanifesto.org/ which explains "The Need to Go Reactive". Ugh. I'm deleting the section. -- Taylan

OORP Example Needs Revision edit

In the Object Oriented example, it is written that, "Below is an illustration of the A=X+Y introductory example." However, although the problem is the same, the introductory example is illustrated with A = B + C, using B & C as variables, rather than X & Y. The OORP example should probably be amended to utilize B and C as the variables, as in the introductory example.--Jtrnp (talk) 01:39, 31 March 2015 (UTC)Reply

Discuss, please:

Glitch section, qualification edit

Perhaps it should be noted more directly that the phenomenon called "glitch" here isn't really an error or a mistake. The example given explicitly invokes synchrony. This is the real reason that it might not perform "as expected" in a reactive framework; that is, because the declarative nature of reactive programming only holds as long as the temporal aspect of states is not involved in the declarations.

In the section it says that reactive languages sometimes "permit glitches", but I don't think that's quite right. It's not that values sometimes "temporarily fail to correspond to the program source". The paradigm is about deliberately letting go of serial control of execution flow. Jimmymath (talk) 19:39, 5 March 2020 (UTC)Reply