What is the difference between Dataflow programming and Reactive programming?

核能气质少年 提交于 2019-12-03 09:27:09

问题


I really can't see the difference between them. They are both about data flowing through instructions and the propagation of changes in the input data. I've read this book (authored by Matt Carcki) and it clearly says that the are both the same. On the other hand the wikipedia establish Reactive programming as a form of Dataflow programming and this stackoverflow answer does it too.

So, what is the conceptual difference between Reactive programming and Dataflow programming?


回答1:


Reactive Programming is a form of Dataflow programming only. But its also a paradigm which is oriented around propagation of changes along with data flows

Like a example given on Wiki Page

a:=b+c would mean that a is being assigned the result of b + c, in the instant the expression is evaluated, and later, the values of b and c can be changed with no effect on the value of a. However, in reactive programming, the value of a would be automatically updated whenever the values of b and c change, without the program executing the sentence a := b + c again.

Which is the main difference between two of them. It binds the variables with expression and system reacts upon the changes in variable without running the expressions again and again.



来源:https://stackoverflow.com/questions/30685707/what-is-the-difference-between-dataflow-programming-and-reactive-programming

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!