My Answers to the Pop Quiz

It is only fair that I come clean, too. This section is optional. Read it if you'd like to know a little more where I am coming from.

Which programming languages have you learned in CS?

At the time I took my first course in Programming Languages, I had learned Fortran, PL/I, IBM 360/370 assembly language, and IBM 360/370 JCL (sort of like a shell scripting language for a mainframe computer) in my college CS courses. I had learned BASIC in high school, back when it was written in all-caps and free of .NET's baggage.

Since then, I have learned many more.

Which of these languages is your favorite?

At the time I took my first course in Programming Languages: PL/I.

Beginning sometime in graduate school: Smalltalk.

These days: I program mostly in Python and Racket, though I prefer Ruby to Python and sort-of prefer Scheme to Racket. I used to write a lot of Java, though I prefer Smalltalk to Java. We all make compromises...

If I must pick only one, I still say Smalltalk. True love never dies.

Why?

Smalltalk and Scheme are small, beautiful implementations of beautiful ideas. When I work in them, I feel powerful and artistic at the same time. Ruby gives me the same beauty and power in a very handy scripting language.

My favorite languages give me the power to express interesting ideas with some ease, with some flexibility, and with some elegance. I like some languages primarily because they give me a particular kind of power in a particular kind of domain (say, Cobol for data processing and report generation). And I like some languages just because they are beautiful!

More Questions, More Answers

Why do we have all these different languages? Because some problems demand certain features, which can often be optimized in a special-purpose language. Because researchers and practitioners are always looking for better ways to express interesting ideas and solve challenging problems. Because we have lots of different kinds of programmers.

What makes one language "better" than another? The combination of its feature set plus the environment in which it will be used. (Note that this is different from what makes one language more popular, a question with a different answer!)

What makes one language easier to learn? Primarily, familiarity — with the paradigm, with the syntax. After that, simplicity. And don't underestimate the closeness of the match between the language's primitives and the language of the problem.

Can a program be beautiful? How about a programming language? How so? Oh, my — yes, and yes! A program like the earliest version of Adobe Photoshop is beautiful in the way it weds simplicity, power, and usability. Ward Cunningham's original wiki software is beautiful in its simplicity, power, and ability to change how people interact. The Decorator design pattern is beautiful in its ability to tease apart orthogonal ideas and make the code I write say just what I mean.

A programming language like Scheme is beautiful in the way it allows programmers to use a small number of simple ideas to express a vast number of complex ideas elegantly. Smalltalk is beautiful in the same way, as it starts with exactly one idea: objects send messages to one another, and from that idea builds an environment of unbelievable creativity and flexibility.

Don't get me started. But I hope that, even if you don't understand what I'm saying about beauty today, by the end of the semester you sense my love for the beauty of programming languages.