It seems to me that I understand that all the main components of ReactiveCocoa (conceptually), understanding how to connect all parts together, are still a bit confusing.
For example, after reading the βSignalβ, I fully expected that the SignalProducer would have only one start () method that returns a signal that you would use like this:
mySignalProducer.start().observe(myObserver)
Instead, you must pass the observer to start (), and the SignalProducer calls the watch () function for you:
mySignalProducer.start(myObserver)
This means that the SignalProducer interface is much larger (more for understanding), because all changes to the monitoring function () must be duplicated when starting () (for example, startNext (), etc.).
I think there are two possibilities:
- There are technical reasons why start () cannot just return a signal
- I understand the concept of SignalProducer conceptually, which leads to uncertain expectations of the interface.
If so, I guess this has something to do with managing memory and supplies, which I still don't quite understand.
I'm more worried about that. Internally, my understanding of SignalProducer is mostly mapped to the Factory concept, for example:
mySignalFactory.createSignal().observe(myObserver)
therefore, I am surprised that we do not find start (), which returns a signal.
I would be very grateful if the community could shed light here.
Thanks!