4 ms·
Not only is Excel functional programming, it's lazy, pure functional programming: each cell (variable) can only define itself, and so cannot change the content
by runeks 10y ago
Not only is Excel functional programming, it's lazy, pure functional programming: each cell (variable) can only define itself, and so cannot change the content of other cells. Evaluation is controlled by the Excel runtime system, which doesn't evaluate cell expressions unless they're scrolled into view, or needed to evaluate a cell that's scrolled into view.
Exactly like Haskell. If Excel were impure, it would mean an expression in one cell would have the power to alter the value of another cell. So, in effect, a cell becomes a synonym for the expression it contains, rather than a -- possibly mutable -- reference to the value its expression evaluates to.
- Chris2048 10y agoI'll also mention excel now supports models, for proper table relations, avoiding the INDEX/MATCH function nonsense.
- deleted 10y ago[deleted]
- derefr 10y agoHuh; never heart about this! Is there a good walkthrough of this functionality for people who already work with relational databases and just want a compare-and-contrast?
- Chris2048 10y agoNot sure, although MS has a few tutorials https://support.office.com/en-ie/article/Create-a-Data-Model-in-Excel-87e7a54c-87dc-488e-9410-5c75dbcb0f7b https://support.office.com/en-ie/article/Create-a-Data-Model...
- Gravityloss 10y agoso, make a Haskell editor which only shows the one line of code where your cursor is on, rest of logic is completely hidden.
- will_pseudonym 10y agoWith VBA, you can make a cell modify other cells.
- osullivj 10y agoTrue. Excel makes a distinction between functions and commands. Functions can't modify other cells, commands can. Since VBA can be used for "automation" (invoking UI events) it can modify cells.