Fork me on GitHub

@raspasov what about an approach like cursors/subscription? You still “predent” to have a global and pure sate but enable isolated and faster change for these components?


The discussion about cursors/subscriptions can be a long one. But the short answer is: I’m not convinced “subscriptions” are a good abstraction.


There was an analogy from a Rich Hickey talk. It goes something like: “if we are all watching a game at the stadium, we can all watch uninterrupted. Nobody needs to “subscribe” to the game.” I’m generally very weary of abstractions that try to simulate the wrong physics and “subscriptions”, as commonly described, seem to me to fall in that category.


To me cursors is about two things: • focus (think “lens”) on a specifiy part of the global state for isolation (component does not need to know where in the global state to main it’s state) • isolation (does the components state affect the global state)


For performance reasons the latter can be interesting.


IOW having a state like {:foo :bar :sub {:something "different" :fast-paced-counter (atom 0)}} ?


Reseda has subscriptions for this kind of thing.