gongweixin
V2EX  ›  编程

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

  •  
  •   gongweixin · Feb 17, 2014 · 6155 views
    This topic created in 4489 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
        1
    bcxx  
       Feb 17, 2014   ❤️ 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
        2
    gongweixin  
    OP
       Feb 17, 2014
    @bcxx 了解了。thx
    learnshare
        3
    learnshare  
       Feb 17, 2014
    Qt 的信号槽机制?
    tioover
        4
    tioover  
       Feb 18, 2014
    @bcxx 感觉有点像惰性求值的意思
    terrytowne
        5
    terrytowne  
       Mar 10, 2014
    Imperative programming + declarative, lazy evaluation = Reactive programming

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