[Haskell-cafe] Is Excel the most used -- and fucntional -- programming lanuage on Earth?

Bjorn Lisper lisper at it.kth.se
Wed Jan 31 07:06:58 EST 2007


>Dan Piponi:
>On 1/30/07, Lennart Augustsson <lennart at augustsson.net> wrote:
>> Excel is what I like to call a 0:th order functional language,
>> i.e., you can't even define functions, just values.  :)
>
>Every cell with an expression in Excel is a function. The problem is
>that the domains and codomains of these functions don't usually
>contain functions. Maybe that makes it a first order functional
>language.

Or maybe not. Yes, every cell in isolation contains an expression possibly
with free variables, and so can be seen as a function in those
variables. But these variables are not unbound since they are defined
elsewhere in the spreadsheet. Thus, the sheet is rather a system of
equations defining values, not functions. I think 0:th order is a good term
:-)

>But...suppose we had a spreadsheet a little like Haskell where each
>cell has a static type, and the values can be Haskell functions. What
>interesting things could we do with it that we couldn't do with Excel?

I had a MSc student doing something in this direction some years ago. He
made a Haskell interface which was intended to work like a spreadsheet. In
this interface, every declaration has a value window (if the entity declared
has a showable type) and a declaration window. A designated button triggers
a recompilation, and thus also a recalculation of all declared values -
this, I think, captures the essence of spreadsheets which is to be able to
make changes and quickly see the results. In order to support the kind of
array omputations often done in spreadsheets, an extended array module was
defined which declares a number of array functions and other conveniences.

See http://www.mrtc.mdh.se/index.php?choice=projects&id=0041.

Björn Lisper


More information about the Haskell-Cafe mailing list