3 ms·
How is this different than a method pointer, Action<T>, Runnable etc? Maybe I don't understand what you're suggesting. Is there something more to it than assi
by jayd16 5y ago
How is this different than a method pointer, Action<T>, Runnable etc? Maybe I don't understand what you're suggesting. Is there something more to it than assigning a method to a variable and calling it as if it was a plain variable?
- Jtsummers 5y agoWhat GP is suggesting is more about push systems than pull. In a push system you'd have something like this: a = 10 b = 20 c = a * b s = "{c}" widget.display(s) -- will show '200' at the start a = 2 -- c = 40 and widget shows '40' It's like a spreadsheet. In a pull system, each dependent would have to periodically update itself, which means they'd be doing unnecessary work when there haven't been changes, and be stale (for longer than necessary) when there have been changes.
- jayd16 5y agoSo maybe something closer to an observable but sugar built into the language? I suppose it could be interesting if everything was an observable and you could implicitly chain observables through assignment.
- Jtsummers 5y agoYes, and I actually meant to include them in my comment but for some reason didn't.