响应式编程的启示

响应式编程(Reactive Programming),算是一种异步编程范式。简而言之,在传统指令式编程下:

a = 1
b = 2
c = a + b 
print c //输出 3
a = 4
print c //输出 3

这个例子很平淡,但是在响应式编程下:

a = 1
b = 2
c = a + b 
print c //输出 3
a = 4
print c //输出 6
b = 3
print c //输出 7

Continue reading 响应式编程的启示