Enabling Observable
types to react to being observed would not only help with guaranteeing all values are seen, but would enable lazy observation. This is particularly important for expensive (for a variety of meanings of the word) observations, like long running computations or network requests. It would be great if I could have an Observable
network stack that only starts requests when observers are added and automatically tears them down when the last observer is removed. You could apply the same thing to location managers on mobile, background computations, or system events. As a general solution to the observability problem in Swift, this proposal should be more expansive, not less.
2 Likes