views:

355

answers:

4

I'd like to know if there exists a spreadsheet application which uses an existing functional-programming language to define functions.

I've already heard about Resolver One which uses python, but I'm more interested in anything which uses a purely functional language like Haskell.

Thanks

A: 

Python can also be used as a macro language in OpenOffice. Not sure about Haskell.

jbochi
+3  A: 

If you count JavaScript as a functional programming language you can use Google Web Scripts for Google Spreadsheets :)

Annie
I suspect Javascript is the most strongly functional language you'll find. Also note that there are compilers for Haskell and OCaml to Javascript.
Chuck
Haskell isn't "the most strongly functional language"?
mipadi
@mipadi: It's not that Haskell isn't functional; it's that I don't expect to find a real spreadsheet application that uses Haskell to define functions.
Chuck
+1  A: 

There's Scheme In A Grid (http://siag.nu/siag/), but it's looking kind of out of date.

There's also Haxcel (http://www.mrtc.mdh.se/projects/Haxcel/), which was a thesis project.

If you want to do functional programming in a spreadsheet the best practical choice is probably Resolver One, as you've already noted. (I would say "functional programming" in this context means first-class functions that work with other spreadsheet functions and the sheet itself - i.e. you could write a function that returns a function, call it and have the result go in a cell for yet other cells to call, etc. I don't know if OpenOffice and Google Docs will do that.)

A colleague and I have been working on a little project to do this within Excel, using a syntax very close to Excel formulas. I described it briefly in a comment on Roy MacLeans's VBA Blog:

http://roymacleanvba.wordpress.com/2009/08/04/domain-specific-languages-%e2%80%93-part-2/#comment-130

It's changed some since I posted that, but if you want to call our very-minimal syntax a "language", it's certainly "pure". (And I'm still planning to release it to the vast universe of FP-implemented-in-VBA enthusiasts, but stuff keeps coming up...)

jtolle
+5  A: 
Norman Ramsey