reading 05: programming languages
Programming languages require different approaches based on how they represent, change, and store data. I guess the first time I really thought differently about programming languages was when I learned Scheme for Programming Paradigms. The parentheses were strange, but the language allowed me to truly grasp recursion. One of the Scheme patterns that Prof. McMillan instilled in us was “process the car, recurse on the cdr.” After a while of using that pattern, things start to click, and the world of Scheme opened up before my eyes. The recursion mindset became natural unlike the recursion I had done in C for Fundamentals of Computing. I wasn’t surprised when I came across this quote from Paul Graham:
“So how much shorter are your programs if you write them in Lisp? Most of the numbers I’ve heard for Lisp versus C, for example, have been around 7-10x.”
I hadn’t really considered languages being “better” than others before. I thought it came down to personal preference, being interpreted or compiled, and some metrics like speed. But if it’s really true that Lisp is 7-10x faster than C, then it would seem obvious that Lisp is a more powerful language, especially considering that the 200,000-line Common Lisp core of ITA’s application “humiliates [Travelocity and Expedia] technologically.” I certainly thought Scheme was neat, but I didn’t really think about how concise or powerful it was. I’m interested in venturing back to it now after reading Paul Graham’s opinions on the matter.
But what is it that makes Lisp/Scheme “simply the most powerful language available”? And what’s lacking in our current languages? Paul Graham claims that macros make Lisp very unique, almost free from syntax in a sense. The way he describes it makes Lisp seem like Linux, devoid of the gross features of Microsoft that restrict your hacking freedom. Perhaps, though, languages aren’t lacking features so much as programmers are lacking time. Paul Graham even says that he “doesn’t expect to convince anyone (over 25) to go out and learn Lisp” (p. 178). Programmers get comfortable with one language that their company expects them to use, and they don’t have the resources to learn more powerful languages that could get the job done better.
I imagine that Python, C, and Lisp will all persist far into the future. They essentially hit all three levels of programming, with Python being the easiest and Lisp being the most challenging. While you can learn Python from just about any book or website, it seems like Lisp requires your brain to change habits. I think that the nerds who appreciate Lisp will probably ensure it never dies out, whereas Python could more easily be replaced by something else simple and intuitive. I hope more mind-streching languages arise to give hackers the edge in their startups. Or maybe Lisp can already do that for them.