数据流编程和响应式编程有什么区别? [英] What is the difference between Dataflow programming and Reactive programming?

查看:342
本文介绍了数据流编程和响应式编程有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的看不到它们之间的区别.它们既涉及流经指令的数据,也涉及输入数据中更改的传播. 我读过这本书(由Matt Carcki撰写),它清楚地表明它们都是相同的.另一方面,维基百科将响应式编程确立为数据流编程的一种形式,并且

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 they are both the same. On the other hand, the wikipedia establishes 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?

推荐答案

反应式编程仅是数据流编程的一种形式.但它也是一个范式,它围绕更改与数据流的传播而传播

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

就像 Wiki页面上给出的示例

Like a example given on Wiki Page

a:= b + c表示向a分配b + c的结果,在计算表达式的那一刻,之后,可以更改b和c的值,而不会影响b的值一种.但是,在反应式编程中,只要b和c的值发生变化,a的值就会自动更新,而无需程序再次执行句子a:= b + c.

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.

这篇关于数据流编程和响应式编程有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆