Re:Callbacks are imperative, promises are functional
by TheZenPsycho on Saturday March 30, 2013 @09:35PM
(#5467307)
You 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.
[ Parent
| on HN ]
Re:Callbacks are imperative, promises are functional
by gruseom on Sunday March 31, 2013 @02:14AM
(#5467890)
But 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.
Re:Callbacks are imperative, promises are functional
by chousuke on Sunday March 31, 2013 @02:42AM
(#5467934)
The cells are the functions.
Re:Callbacks are imperative, promises are functional
by gruseom on Sunday March 31, 2013 @02:53AM
(#5467957)
A 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.