4 ms·
I feel like reactive programming is approaching ripeness for a mainstream programming language or cross-stack paradigm within the next few years. React, Svelte,
by klabb3 3y ago
I feel like reactive programming is approaching ripeness for a mainstream programming language or cross-stack paradigm within the next few years. React, Svelte, Redux etc in the frontend world has certainly paved the way on the mainstream side, albeit in a simplified environment (singlethreaded, does not cross the network boundary and can simply share memory cheaply). I wonder if a refined version of this with will prevail, or something else like Rx? What are the primitive operations in such a model? Streams, futures, “watch” APIs?
- dgellow 3y agoReactiveUI is based on Rx and is very popular in the .Net world: https://www.reactiveui.net/ https://www.reactiveui.net/.
- bheadmaster 3y agoWhat's the difference between reactive and functional programming? Both seem to focus on expressing relationships between objects and having compiler/runtime infer the computation, instead of explicitly specifying the computation.
- ed_blackburn 3y agoPerhaps if you framed your question subtly differently and asked yourself what is the difference between Erlang and OTP, the answer maybe easier to discern?
- bheadmaster 3y agoWhat's the exact difference between Erlang and OTP that would answer my question?
- ed_blackburn 3y agoOTP is the means by which the programming language is able to accomplish tasks such as process to process comms, how to supervise actors etc. It's the enabler for the distributed computing compared to Erlang which is the programming language. They're (obviously) complementary but OTP is the magic that enable one to deliver on the reactive manifesto. Functional programming needs augmenting with mechanisms that provide the distributed computing features, it's not enough on its own.
- bheadmaster 3y agoThanks for the explanation. Where does reactive programming fit in that concept? Is OTP a "reactive" library? If so, why - what exactly makes it "reactive"?
- ReleaseCandidat 3y agoMost of the time the term used is "Functional Reactive Programming". If that answers your question. Although there exists a paper about "Reactive Imperative Programming" (with Dataflow Constraints): https://typeset.io/pdf/reactive-imperative-programming-with-dataflow-constraints-43eczl0oe5.pdf https://typeset.io/pdf/reactive-imperative-programming-with-...
- dgb23 3y ago> Both seem to focus on expressing relationships between objects and having compiler/runtime infer the computation, instead of explicitly specifying the computation. That's true of every declarative approach. Functional, reactive, relational, regex etc. are all to some degree declarative. To answer your question: Functional programming is really more about avoiding mutation at the language surface, while reactive programming is about how mutation propagates through code, so it's an abstraction over specific mutation. This is why they pair nicely together.
- quickthrower2 3y agoElm was positioned to be this. Still technically could be, but adoption isn’t high. Original Elm had signals.
- agumonkey 3y agoI'd go even one step further, diffusion/chemical/tissue-level programming. I'm sense the idea of multi agent state morphism becoming a norm in people's mind. (from css to to react to kubernetes).
- idkwhoiam 3y agoThe native (future) solution for Apple platforms is SwiftUI [1] + Combine [2]. I use it on a side project and for somebody who works with React 9-5 it feels very natural. In short SwiftUI is like React & Combine is like RxJs. [1] - https://developer.apple.com/tutorials/swiftui https://developer.apple.com/tutorials/swiftui [2] - https://developer.apple.com/documentation/combine https://developer.apple.com/documentation/combine
- ElFitz 3y agoWhile I agree, I’d say I find SwiftUI easier and more intuitive than React. And Combine often much more frustrating than Rx.