3 ms·
I'm not sure what you are proposing is a good API design though. There are plenty of times using KVO where you only want to subscribe for a certain transition
by jawngee 11y ago
I'm not sure what you are proposing is a good API design though. There are plenty of times using KVO where you only want to subscribe for a certain transition of state, well within the lifecycle of either objects.
And I'm not even sure how you'd implement what you are talking about without tracking your subscribers. How does it automatically go away? Weak references with the subscriber implementing a protocol? It's now gotten more complicated than what the original author has proposed. imho.
- Tloewald 11y agoI'm proposing something slightly more complex under the hood to be sure. But the API is simpler. And the point of APIs is to eliminate implementation details from the interface.