Lisp and C
January 5, 2012  

John McCarthy and Dennis Ritchie passed away late last year within a couple of weeks of each other. They created two of my favorite programming languages: Lisp (McCarthy) and C (Ritchie).

Lisp is the most historically important programming language. It introduced three revolutionary features: automatic memory management (via garbage collection), the bundling of code and data (via first-class functions), and memory safety (e.g., no buffer overflows). I doubt that any widely-used programming language going forward will be introduced without these three features, and Lisp had them in 1959.

Of the three, automatic memory management is the killer feature; it makes the other two much easier to implement. It is a good example of a technology so far ahead of its time that it was not generally accepted until four decades after its invention (with the emergence of Java). As late as 1988, when I worked at Bell Labs on Standard ML of New Jersey, the folks in the Unix room (Ritchie et al.) thought that a language with garbage collection was a toy at best.

Lisp has many incarnations: Java, Python, Ruby, Scala, C#, and so on all have automatic memory management and hence are clearly in the Lisp camp, regardless of their surface syntax. Javascript, now the most widely deployed language in the world, is hardly distinguishable from Lisp at all.

C is remarkable in that it occupies its camp essentially alone. I would only (maybe) (sometimes) put C++ in with it, and that came out of the same lab and started as a C preprocessor. All of the core systems on computers today are written in C: operating systems, file systems, network stacks, garbage collectors and runtime systems for Lisp-y languages. Personally I think of it as the rotten core, but that’s not C’s fault: no one has come up with a better alternative, a language with safety but also C’s fine degree of control over data representations, memory and CPU use. I’ve tried myself and I can tell you that it is an incredibly hard problem. I half expect it will take another 40 years of innovation to do the job. In that sense, C is also a language far ahead of its time.