4 ms·
1) Is "the chain that follows this output" pulling the data, or is the data being pushed to it? If you used a pull model rather than a push model, then inputs 1
by 21echoes 12y ago
1) Is "the chain that follows this output" pulling the data, or is the data being pushed to it? If you used a pull model rather than a push model, then inputs 1 and 2 could change a million times but no computation would be executed until the "chain that follows this output" requested the latest value.
2) If you need a push model, couldn't you just use .throttle / .debounce? I feel like FRP has plenty of tools to tackle this problem.
If your worry about recomputation is about efficiency, then admittedly FRP is probably not your best choice of paradigm. FRP consistently chooses reduced code complexity at the expense of efficiency (with the assertion that mutable state / imperative code is inherently more complex in a complex system than .flatMap.throttle.etc, which is obviously debatable).