3 ms·
excel is like pure FP in that - everything you write is an expression that yields a value - those expressions are "pure"/"referentially transparent" bc there
by uryga 6y ago
excel is like pure FP in that
- everything you write is an expression that yields a value
- those expressions are "pure"/"referentially transparent" bc there's no way to do side effects (like writing to another cell)
the whole "recalculate value if any dependency changed" thing would probably fall more under "reactive" systems - you need the notion of inputs that a user can change.
but you're right that efficient recalculation is enabled by the calculations being side-effect-free! we know that changing a cell can only influence cells that reference it, so we only need to recalculate those, not the whole spreadsheet!