gongweixin
V2EX  ›  编程

请教什么是反应式编程(Reactive programming)?

  •  
  •   gongweixin · Feb 17, 2014 · 6563 views
    This topic created in 4651 days ago, the information mentioned may be changed or developed.
    在wiki http://en.wikipedia.org/wiki/Reactive_programming 和 stackoverflow http://stackoverflow.com/questions/1028250/what-is-functional-reactive-programming 上找到了两篇文章,可惜本人英语太烂,看的云里雾里的,求大神能清晰明了的介绍一下。
    5 replies  •  1970-01-01 08:00:00 +08:00
    bcxx
    bcxx
    Feb 17, 2014❤️1
    1
    类似于你给一个 dom 元素绑定了 onchange 事件, 这个元素 change 了,和这个元素相关的东西也会 change……

    wikipedia 那个例子不是讲得很清楚么

    > b = 3
    > c = 2
    > a = b + c
    > a == 5 # True
    > b = 4
    > a == 5 # False
    > a == 6 # True

    也就和 excel 里面引用单元格差不多?
    gongweixin
    gongweixin
    OP
    Feb 17, 2014
    2
    @bcxx 了解了。thx
    learnshare
    learnshare
    Feb 17, 2014
    3
    Qt 的信号槽机制?
    tioover
    tioover
    Feb 18, 2014
    4
    @bcxx 感觉有点像惰性求值的意思
    terrytowne
    terrytowne
    Mar 10, 2014
    5
    Imperative programming + declarative, lazy evaluation = Reactive programming

    Reactive programming + higher order functions, composition = FRP
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   951 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 21:50 · PVG 05:50 · LAX 13:50 · JFK 16:50
    ♥ Do have faith in what you're doing.