Dear Mike,
Thanks, everyone for your replies! Many of you suggested the same approach as Steve, functional programming and monads. At Google, however, we use Java, C++ and Python (collectively "JCP") for programs that run on our servers and JavaScript for programs that run in our webpages. So there's not a lot of call for learning a functional programming language either.
It might be worth noting that JavaScript is a functional language. (It has a lambda operator ("function"), closures, and can pass functions as parameters and return values.) However, because it has eager evaluation, the whole monad business does not apply, at least not in the way it applies to Haskell. In fact, JavaScript is probably the most widely used functional language on the planet. But there are two strange phenomena: - Functional-programming experts keep on overlooking JavaScript (probably because it is so ugly from a theorists point of view) - Most professional JavaScript programmers fail to see the enormous functional potential of JavaScript. It is a very strange situation: the whole world uses a functional language and almost nobody is aware of it. Anyway, even though I am very category-prone, I must admit that category theory might be a very tough sell for the JavaScript crowd :) Best, Carsten [For admin and other information see: http://www.mta.ca/~cat-dist/ ] Status: RO