3 ms·
It's hilarious that the Observable pattern that MVC and Qt are organized around has become "a game-changer for large applications where context is used to distr
by kragen 1y ago
It's hilarious that the Observable pattern that MVC and Qt are organized around has become "a game-changer for large applications where context is used to distribute state across many components" this year. MVC is maybe 50 years old now?
- rudedogg 1y agoThere’s a difference, see https://www.builder.io/blog/signals-vs-observables https://www.builder.io/blog/signals-vs-observables
- kragen 1y agoThanks! But what's being described there as "observable" is something other than the Observer pattern that "observable" comes from, which is closer to what it calls "signals". https://en.wikipedia.org/wiki/Observer_pattern https://en.wikipedia.org/wiki/Observer_pattern
- rudedogg 1y agoI think they are the same, Observable or Observer pattern both require a manual subscription, and publishing is done through a callback offering the latest in a stream of values. See https://github.com/tc39/proposal-signals?tab=readme-ov-file#example---a-signals-counter https://github.com/tc39/proposal-signals?tab=readme-ov-file#... for more on how signals differ. Mainly no manual bookkeeping and the signal is kind of like a handle, and it allows lazy/computed signals that reference other signals and do the change tracking