Wednesday, April 09, 2008

The Most Important Programming Language I've Learned

I've programmed in a lot of different languages: BASIC, Pascal, Cobol, Fortran, WSL, C, perl, icon, and more. I've been paid to program in C, perl, Bourne shell, and others, but it turns out that the most important language I learned was one that I picked up on my own, to play with: Scheme.

I'm just learning Javascript now, as part of the next phase of Evergreen development, and it was pretty easy. I just flipped quickly through the first part of the book to get a flavour of the syntax and learn the rules for scoping, and in about thirty minutes, I was ready to get started. The last new language that I learned was Python (which I started working in last year). It took a bit longer to get into Python, because it's a much richer language that Javascript, but it still didn't take long, and Python has become my favourite programming language.

But Scheme is the most important language I learned because so many other languages have adopted some of its core concepts. Modern Perl, Javascript, and Python books all spend a great deal of time talking about "lexical scoping" and what this means for variable access, and how one can define functions inside of functions, and what that all means, and they usually give the same tired example of writing a function that returns a function (usually a function that adds 5 to its argument).

Yeah.... Like Scheme did back in the '80s (except Scheme calls it "statically scoped"). Everybody keeps reinventing Lisp (and Scheme is just a specialized educational dialect of Lisp), but nobody's managed to do better than Lisp at so many things. The Evergreen guys are regularly doing sexy dynamic function creation stuff without even realizing that they've successfully recreated very-high-level programming methods that Guy Steele considered normal back in the early '80s.

Start by learning Common Lisp or Scheme, do some continuation-passing programming, and after that, everything new is just syntax.


fawcett said...

David, I agree completely. These days, there are some wonderful Scheme implementations available (PLT Scheme, Chicken) with supportive communities, making it a viable language for application development. (And anyone who's serious about programming should learn enough Scheme to read SICP, even if they never use the language again.)

Also interesting is Clojure, a recent, modern Lisp for the JVM that addresses the library problem that many Lisps suffer, without sacrificing Lisp's advantages. If you haven't played with it yet, I think you'll enjoy it.

Lombardo said...

C is fundamental language and bridge between them allca