Signals are event streams that send values over time that are already in progress. We can imagine them as pipes that send values without knowing about the previous values they have sent or future values they are going to send. Signals can be composed, combined, and chained declaratively.
Signals can unify all Cocoa common patterns for asynchrony and event handling:
- Delegate methods
- Callback blocks
- Control actions and responder chain events
- Future and promises
- Key-value observing
As all of these mechanisms can be represented in the same way, it is easy to declaratively chain and combine them together.
ReactiveSwift represents signals as Signal. Signals can be used to represent notifications, user input, and so on. As ...