Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.misc > #667

Re: Can Reactive Programming Handle Complexity?

From dialmove <dialmove@gmail.com>
Newsgroups comp.misc
Subject Re: Can Reactive Programming Handle Complexity?
Date 2014-02-21 15:49 +0000
Organization A noiseless patient Spider
Message-ID <le7sj1$oat$1@dont-email.me> (permalink)
References (2 earlier) <le5aum$1c4$2@dont-email.me> <87sirdzmdy.fsf@elektro.pacujo.net> <9cb11c8e-0607-44b7-b8b6-370bb82f532a@googlegroups.com> <le7kk7$v5q$1@dont-email.me> <87k3coeco7.fsf@elektro.pacujo.net>

Show all headers | View raw


On Fri, 21 Feb 2014 16:57:28 +0200, Marko Rauhamaa wrote:


> It seems to be a big name for the concept of event streaming.
> Specifically, C#/.NET has added standard classes to convert callbacks to
> event streams.
> 
> Streaming definitely has its place and has been in active use for
> decades (half-duplex Unix pipelines, full-duplex Sys V network drivers
> etc), but it's a smallish paradigm that hardly merits the term "Reactive
> Programming." It's nowhere near the fundamental nature of Logic
> Programming or even threads.

It depends on perspective. If you see it as a tacked-down library on top 
of an interactive language, of course it's smallish. But from that 
perspective, OOP is just high-order functional programming plus cells, so 
it's not a big thing either, true? It's "just a big name for the concept 
of state".

The thing with programming paradigms is not that they introduce whole new 
constructs, it's the way they make you think about them. Any paradigm will 
reuse the same old basic elements available in all previous programming 
styles, and explain them in a new way that makes sense.


> 
> By all means, use streams wherever applicable. Note, however, that when
> addressing events, the devil is in the state machine. Very few things in
> the event world are so streamlined that you can deal with them with a
> nifty pipeline. And in the few cases where such a half-duplex pipeline
> can be set up, a classic, prosaic *wrapper class* can manage your
> reactive programming needs without special support from the standard
> library.

But that's the thing, if you program in RFP you *don't have* state 
machines, it's streams all the way down. If you study RFP as a 
mathematical way to describe program execution, like PL people do, it's a 
whole new theoretical construct, with its own set of axioms. The formal 
semantics of an RFP language will look different than those from an 
imperative language, which look different than those from a functional or 
a logic language. 

Surely you *can* think of the language ''implementation'' as being a 
program written in a different, old paradigm (which negates any benefit 
provided by the new, btw), but you don't *need* to; any Turing-complete 
language can be transformed into any other. I've seen languages for 
programming micro-controllers based on the lambda calculus, with no notion 
of state, if that's your thing.

You wouldn't use dataflow programming for calculating a concurrent 
constraint satisfaction problem (or maybe you would, but it will be more 
difficult), as you wouldn't use a constraint logic solver to program a 
platformer game. When you find a paradigm that is well suited to the 
problem to solve, there's little use in thinking of how that paradigm 
translates into a different, less adequate paradigm.


See [1] for how different paradigms relate to each other (taken from [2]); 
the difference from one paradigm to another is always minimal, but they 
make the language feel completely different.


[1] http://en.wikipedia.org/wiki/File:Programming_paradigms.svg
[2]  "Programming Paradigms for Dummies: What Every Programmer Should 
Know", http://www.info.ucl.ac.be/~pvr/VanRoyChapter.pdf

Back to comp.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Can Reactive Programming Handle Complexity? Oregonian Haruspex <bob_davis_retired@yahoo.com> - 2014-02-18 16:33 -0800
  Re: Can Reactive Programming Handle Complexity? dialmove <dialmove@gmail.com> - 2014-02-20 16:17 +0000
    Re: Can Reactive Programming Handle Complexity? dialmove <dialmove@gmail.com> - 2014-02-20 16:36 +0000
      Re: Can Reactive Programming Handle Complexity? Marko Rauhamaa <marko@pacujo.net> - 2014-02-20 20:09 +0200
        Re: Can Reactive Programming Handle Complexity? wjwlsn <ibillwilson@gmail.com> - 2014-02-20 13:05 -0800
          Re: Can Reactive Programming Handle Complexity? Marko Rauhamaa <marko@pacujo.net> - 2014-02-20 23:18 +0200
            Re: Can Reactive Programming Handle Complexity? wjwlsn <ibillwilson@gmail.com> - 2014-02-20 13:40 -0800
            Re: Can Reactive Programming Handle Complexity? dialmove <dialmove@gmail.com> - 2014-02-21 13:56 +0000
          Re: Can Reactive Programming Handle Complexity? dialmove <dialmove@gmail.com> - 2014-02-21 13:34 +0000
            Re: Can Reactive Programming Handle Complexity? Marko Rauhamaa <marko@pacujo.net> - 2014-02-21 16:57 +0200
              Re: Can Reactive Programming Handle Complexity? dialmove <dialmove@gmail.com> - 2014-02-21 15:49 +0000
                Re: Can Reactive Programming Handle Complexity? Marko Rauhamaa <marko@pacujo.net> - 2014-02-21 18:22 +0200

csiph-web