matrix

awb99 2025-01-14T05:16:51.065459Z

The problem is: a function that renders ui has typically two parts 1. State management / formula creation and 2. Html rendering of values. In the state management part there will be certain pure static expressions that need to be run only once. And then there will be many formulas that depend on other cells. The question is if it is possible to put each expression into either static or dynamic category. If it is static it is a plan value that the expression would evaluate to. If it is dynamic a cell needs to be created that gets updated when one of its dependencies change. Perhaps this can be done just by walking the expressions and some convention of naming static and dynamic symbols. It would reduce total code size and would allow to focus only on the data flow, not in determining if something is a value or a cell. Something similar is being done by electric l, but they use the analyzer for that. The question is if with some semantical naming rules a simple tree walk is all that is needed.