top | item 10752260

(no title)

ds300 | 10 years ago

> Glitches as demonstrated via the diamond pattern can be avoided by traversing the graph in topological order.

This is correct for DAGs which only propagate value (as in Javelin[1] and my own library DerivableJS[2]), but for graphs which propagate events (as in Rx), topological sorting would only work for those parts of the graph which are effectively propagating value. Events don't have an inherent dedupe operation, so it is very difficult to even imagine ways in which glitch avoidance could be automatically enforced. It would certainly require semantic program analysis.

Personally I think we should be avoiding the proliferation of events (as encouraged by Rx enthusiasts) for exactly this reason. Their imperative nature makes them very difficult to reason about.

[1]: https://github.com/hoplon/javelin

[2]: https://github.com/ds300/derivablejs

discuss

order

noelwelsh|10 years ago

The event/value distinction is an interesting viewpoint I hadn't considered. Thanks for writing this.