I’m tempted to say (which is to say I’m wrong, but maybe there’s something to be learned by pretending it’s true) that everyone should build their own little reactive framework from scratch.

They’re not that hard to build (if you keep it simple to start). My latest work is in a one-file gist. But there are so many subtleties. It just became very clear to me why RxSwift’s Variable requires you to call asObserverable() on it before you can treat it as an Observable. Why not just have it be an Observable I asked? So I built a system like that. And it actually works fineā€¦for a while. And then you hit the little tricky bits where things don’t compose the way you think they would. (See the now commented-out LatchedStream.)

The lesson I’m learning (by doing) is that mutable state can actually be pretty simple (heresy I know, but simple mutable state maps quite naturally to common intuition and is a powerful tool that is excessively maligned, but that’s another posting). And streams of values can be pretty simple. But trying to blur them together; the desire that leads to creating Variable in the first place, is a bit a minefield. I see why RxSwift has deprecated it.

But it’s so much easier to use for some things; it’s hard to give up.