4 ms·
"Excel is not functional. It is declarative. You declare the relationships between the cells and Excel uses those to propagate changes." Whereas in functional
by gngeal 14y ago
"Excel is not functional. It is declarative. You declare the relationships between the cells and Excel uses those to propagate changes."
Whereas in functional languages, the functions declare relationships between values and the language uses the evaluation model to propagate the results between function evaluation. Where's the difference?
- ww520 14y agoFunctional language has the declarative aspect while declarative language lacks the functional aspect. Just because A => B doesn't mean B => A.
- TheZenPsycho 14y agoYou are correct that the fact that excel is declarative does not, on its own, make it "functional"... the fact that excel formulas adhere (by the definition of what an excel formula is) to the statelessness, and referential transparency requirements of "first order functions" does make it functional.
- gruseom 14y agoBut Excel doesn't have first order functions. You can't even define a function in spreadsheet cells, let alone pass one around as a value.
- chousuke 14y agoThe cells are the functions.
- gruseom 14y agoA cell formula defines a computation, but not a function. For it to be a function you have to be able to reuse it (call it as a function) in multiple places. For example, you can't define the abstraction "square" in Excel. You can compute 2 * 2, A1 * A1 and so on. But there's no way to define a construct which given x produces x * x, then reuse that construct everywhere you want to square things. Everywhere you want to square something, you must inline the computation. That's the absence of functional abstraction.
- ww520 14y agoThe reusability test of function nails it. Thanks for clarifying it. Sometimes we just need to go back to the basic definition to make things clear.