gpt4 book ai didi

signals-slots - "Signals and Slots"概念是响应式(Reactive)编程吗?

转载 作者:行者123 更新时间:2023-12-04 06:13:16 27 4
gpt4 key购买 nike

正如标题中所写 - “信号和插槽”是一种简单的响应式(Reactive)编程方式吗?

最佳答案

Signals/SlotsObserver Pattern 的实现.

来自维基 Reactive Programming :

Reactive programming has principal similarities with the Observer pattern commonly used in object-oriented programming. 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.



他们使用 Excel 的例子Reactive Programming wiki 中的单元格/公式,这无疑是使用 excel 源代码中隐藏的观察者模式实现的,以使其真正发生。然而,对于“excel 程序员”来说,这是响应式(Reactive)编程,因为他们不必自己实现观察者模式……所以在那个层面上是有意义的。 C++/C#/C/etc 没有内置这种能力。

关于signals-slots - "Signals and Slots"概念是响应式(Reactive)编程吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7540665/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com