I just read through a nice little article by Kathleen Fisher about computer science undergraduate education and programming languages, titled We Need More Than One: Why students need a sophisticated understanding of programming languages. In it, Fisher argues that different programming languages are suited for different tasks and machine models. Because we expect both the tasks that CS graduates will perform and the machines they program on to change substantially over the course of their careers, we should expect the languages they use to change frequently. Therefore we should prepare students to learn and program in a variety of different languages. Fisher also makes the crucial point that—like natural language—learning a second language may be quite difficult, a third language less so, with the process becoming substantially easier from then on out.
This jives pretty well with my experience learning functional languages in college (Scheme and Haskell). I found that programming in those languages substantially changed the way I think about problems, by expanding the range of solutions I look for. After digging through a (to me) nightmarish mountain of C++ code on a recent SIGGRAPH character animation project, I’ve found myself wondering whether or not character animation can be done more effectively in a functional, or ideally dataflow language (such as the graphical languages MAX/MSP for audio or Apple’s Quartz Composer). At the very least, the proliferation of shared_ptr wrappers on nearly every object signalled to me that we ought to be writing in a language with built in garbage collection. Or, alternatively, it could have been that my teammates, used to Java and C#, instinctively wanted to rely on shared_ptrs everywhere, rather than writing in a more traditional C++ style. Regardless, learning multiple languages has strongly colored the way I think about programming problems I encounter.
And learning new languages really does become much easier. I’ve been blazing through an ocaml tutorial in my spare time (thanks to prior experience with Scheme and Haskell). I expect to be in a position to start prototyping some functional animation language ideas some time next month! (god willing, I won’t lose interest or get distracted before then)