擅长:python、mysql、java
<p>你要找的是所谓的<strong><a href="http://en.wikipedia.org/wiki/Reactive_programming" rel="noreferrer">(Functional) Reactive Programming</a>。</strong>对于普通的Lisp,有单元格–请参见<a href="http://common-lisp.net/project/cells/" rel="noreferrer">Cells project</a>和<a href="http://smuglispweeny.blogspot.com/2008/02/cells-manifesto.html" rel="noreferrer">Cells manifesto</a>;对于python,有<a href="http://peak.telecommunity.com/DevCenter/Trellis" rel="noreferrer">Trellis library</a>。</p>
<p>电子表格也使用同样的范例。对于跟踪多个相关参数非常有用,例如在GUI编程中。</p>
<p>反应式编程类似于观察者模式,但有一个重要的区别:</p>
<blockquote>
<p><strong>Similarities with Observer pattern</strong> However, integrating the data flow concepts into the programming language would make it easier to express them, and could therefore increase the granularity of the data flow graph. For example, the observer pattern commonly describes data-flows between whole objects/classes, whereas object-oriented reactive programming could target the members of objects/classes.</p>
</blockquote>