我真的看不出它们之间的区别.它们都是关于流经指令的数据和输入数据中的变化传播.我读过这本书(由Matt Carcki撰写),它清楚地表明两者都是一样的.另一方面,维基百科建立了反应式编程作为数据流编程的一种形式,这种堆栈溢出的答案也是如此.
那么,Reactive编程和Dataflow编程之间的概念差异是什么?
paradigms computer-science glossary dataflow reactive-programming
我目前正在为连续环境中的编程开发一种新语言(将其与电气工程相比较),并且我对某种语言结构有一些想法.
让我通过解释然后按定义解释这个特征:
x = a U b;
Run Code Online (Sandbox Code Playgroud)
x
变量在哪里,a
而且b
是其他变量(或静态值).这就像是a
和之间的结合b
; 没有重复,也没有具体的订单.
with(x) {
// regular 'with' usage; using the global interpretation of "x"
x = 5;
// effectively will do:
// x = a U b U 5;
// a = 5;
// b = 5;
// Thus, when "a" or "b" changes, "x" is still equal to "5".
}
with(x = a) {
// this code block is executed when the "x" …
Run Code Online (Sandbox Code Playgroud)