Seibel: Wasn’t that sort of the idea behind your pycore project, toreimplement Python in Smalltalk?
Deutsch: It was. I got it to the point where I realized it would be a lotmore work than I thought to actually make it work. The mismatchesbetween the Python object model and the Smalltalk object model were badenough that there were things that could not be simply mapped one-for-onebut had to be done through extra levels of method calls and this, that, andthe other.
Even at that, Smalltalk with just-in-time code generation was, for code thatwas just written in Python, still in the same range as the C-codedinterpreter. So the idea that I had in mind was that if it had been possible toopen-source the Smalltalk code generator, taking that code generator andadapting it to work well with the Python object model and the Python datarepresentation would not have been a huge deal.
But it can’t be done. Eliot Miranda, who’s probably the most radical of mybuddies associated with VisualWorks, tried, and Cincom said, “Nope, it’s astrategic asset, we can’t open-source it.”
Seibel: Well, you’re the guy who says software should be treated as acapital asset.
Deutsch: But that doesn’t necessarily mean that it’s always your beststrategy to prevent other people from using it.
Seibel: So in addition to being a Smalltalker from way back, you were alsoan early Lisp hacker. But you’re not using it any more either.
Deutsch: My PhD thesis was a 600-page Lisp program. I’m a very heavydutyLisp hacker from PDP-1 Lisp, Alto Lisp, Byte Lisp, and Interlisp. Thereason I don’t program in Lisp anymore: I can’t stand the syntax. It’s just afact of life that syntax matters.
Language systems stand on a tripod. There’s the language, there’s thelibraries, and there are the tools. And how successful a language is dependson a complex interaction between those three things. Python has a greatlanguage, great libraries, and hardly any tools.
Seibel: Where “tools” includes the actual implementation of the language?
Deutsch: Sure, let’s put them there. Lisp as a language has fabulousproperties of flexibility but really poor user values in terms of its readability.I don’t know what the status is of Common Lisp libraries is these days, but Ithink syntax matters a lot.
Seibel: Some people love Lisp syntax and some can’t stand it. Why is that?
Deutsch: Well, I can’t speak for anyone else. But I can tell you why I don’twant to work with Lisp syntax anymore. There are two reasons. Numberone, and I alluded to this earlier, is that the older I’ve gotten, the moreimportant it is to me that the density of information per square inch in frontof my face is high. The density of information per square inch in infixlanguages is higher than in Lisp.
Seibel: But almost all languages are, in fact, prefix, except for a smallhandful of arithmetic operators.
Deutsch: That’s not actually true. In Python, for example, it’s not true forlist, tuple, and dictionary construction. That’s done with bracketing. Stringformatting is done infix.
Seibel: As it is in Common Lisp with FORMAT.
Deutsch: OK, right. But the things that aren’t done infix; the commonones, being loops and conditionals, are not prefix. They’re done byalternating keywords and what it is they apply to. In that respect they areactually more verbose than Lisp. But that brings me to the other half, theother reason why I like Python syntax better, which is that Lisp is lexicallypretty monotonous.
Seibel: I think Larry Wall described it as a bowl of oatmeal with fingernailclippings in it.
Deutsch: Well, my description of Perl is something that looks like it cameout of the wrong end of a dog. I think Larry Wall has a lot of nerve talkingabout language design—Perl is an abomination as a language. But let’s not gothere.
If you look at a piece of Lisp code, in order to extract its meaning there aretwo things that you have to do that you don’t have to do in a language likePython.
First you have to filter out all those damn parentheses. It’s not intellectualwork but your brain does understanding at multiple levels and I think thefirst thing it does is symbol recognition. So it’s going to recognize all thoseparenthesis symbols and then you have to filter them out at a higher level.So you’re making the brain symbol-recognition mechanism do extra work.
These days it may be that the arithmetic functions in Lisp are actually spelledwith their common names, I mean, you write plus sign and multiply sign andso forth.
Seibel: Yes.
Deutsch: Alright, so the second thing I was going to say you have to do,you don’t actually have to do anymore, which is understanding those thingsusing token recognition rather than symbol recognition, which also happensat a higher level in your brain.
Then there’s a third thing, which may seem like a small thing but I don’tthink it is. Which is that in an infix world, every operator is next to both ofits operands. In a prefix world it isn’t. You have to do more work to see theother operand. You know, these all sound like small things. But to me thebiggest one is the density of information per square inch.
Seibel: But the fact that Lisp’s basic syntax, the lexical syntax, is prettyclose to the abstract syntax tree of the program does permit the languageto support macros. And macros allow you to create syntactic abstraction,which is the best way to compress what you’re looking at.
Deutsch: Yes, it is.
Seibel: In my Lisp book I wrote a chapter about parsing binary files, usingID3 tags in MP3 files as an example. And the nice thing about that is you canuse this style of programming where you take the specification—in this casethe ID3 spec—put parentheses around it, and then make that be the codeyou want.
Deutsch: Right.
Seibel: So my description of how to parse an ID3 header is essentiallyexactly as many tokens as the specification for an ID3 header.
Deutsch: Well, the interesting thing is I did almost exactly the same thingin Python. I had a situation where I had to parse really quite a complex fileformat. It was one of the more complex music file formats. So in Python Iwrote a set of classes that provided both parsing and pretty printing.
The correspondence between the class construction and the method nameis all done in a common superclass. So this is all done object-oriented; youdon’t need a macro facility. It doesn’t look quite as nice as some other wayyou might do it, but what you get is something that is approximately asreadable as the corresponding Lisp macros. There are some things that youcan do in a cleaner and more general way in Lisp. I don’t disagree with that.
If you look at the code for Ghostscript, Ghostscript is all written in C. Butit’s C augmented with hundreds of preprocessor macros. So in effect, inorder to write code that’s going to become part of Ghostscript, you have tolearn not only C, but you have to learn what amounts to an extendedlanguage. So you can do things like that in C; you do them when you haveto. It happens in every language.
In Python I have my own what amount to little extensions to Python.They’re not syntactic extensions; they’re classes, they’re mixins—many ofthem are mixins that augment what most people think of as the semantics ofthe language. You get one set of facilities for doing that in Python, you get adifferent set in Lisp. Some people like one better, some people like theother better.
Seibel: What was it that made you move from programming to composing?
Deutsch: I basically burned out on Ghostscript. Ghostscript was one of myprimary technical interests starting in 1986 and it was pretty much my onlymajor technical project starting somewhere around 1992–’93. By 1998,roughly, I was starting to feel burned out because I was not only doing allthe technical work; I was also doing all the support, all the administration. Iwas a one-person business, and it had gotten to be too much. I hiredsomeone to basically build up a business, and he started hiring engineers.