| You are just a small step away from the concepts in Subtext: http://www.subtext-lang.org I highly recommend watching the screencasts, especially the demo: http://www.subtext-lang.org/demo1.html I have wanted a graphical interface for functional programming in environments like Excel for a long time. In my experience, most of the pseudo-programming that has dominated software engineering (object-oriented/MVC/message-based, patterns, best practices) goes away when you can model something directly. Nobody has been able to successfully apply proven engineering concepts from, say, electrical engineering or VLSI to software engineering. I think it's because the leap from imperative code is too long. But nobody has successfully made functional code approachable either, because too often it's contaminated by syntactic sugar that's too symbolic, various handcuffs that make even the simplest tasks arduous (poor handling of global state), or learning curves that can't be scaled when it comes to interacting with real-world time-based data (monads etc). For the most part Excel has none of these issues. You can stick an imperative macro in the middle of your functional code and it works just fine, as it should in any other functional language (as long as you follow certain rules like, no globals). Then you can write another macro to load CSV data into your spreadsheet, or even spit it out to a folder that has a shell script watching it to transform the data again. I think it's more productive to work in that unix-like manner (of a bunch of small tools that do one thing well, pipelined together), than it would be to try to integrate notions like dynamic data into Excel. But the achilles heal of Excel was always obfuscation. We need to get away from language when we're thinking about functional programming, and focus more on data and transformations. Slate looks like a great start, kudos! |
Yet I always have trouble recommending a specific functional language to someone who's curious. I'd say scheme if sexprs weren't so intimidating, ocaml if the syntax weren't so annoying, Haskell if it weren't, well, Haskell (not that I've really used Haskell myself). So for now I just tell people to learn Python and show them map() and closures.
Is there a semi-practical functional language with C-ish call syntax, especially with dynamic typing? And don't tell me Javascript, that's still mostly imperative. Rust seems close (closer than Python at least). I might start recommending that when it stabilizes.