Guy Steele praises TeX

kobogarden1st April 2025 at 5:38pm

Seibel: Is there anything that you would like to talk about? Steele: Well, we haven't talked that much about the beauty in programs, and I wouldn't want that to go without remark. I have read some programs that really strike me as having a kind of beauty to them. TeX is one example, the source code for TeX. METAFONT a little less so and I don't know whether it's just because I use the program less or there's something subtly different about the organization of the code or about the design of the program that I like less. I really can't decide. There are certain algorithms that strike me as just wonderful.

[...]

Steele: He took a very, very complicated program with lots of special cases and reduced it to a single, very simple paradigm: sticking boxes and glue together. That was an immensely critical breakthrough. It turns out to be flexible not only for typesetting text but for all manner of other things as well that have to do with laying things out visually, two-dimensionally, on a page. I wish that more GUI interfaces were based on boxes and glue for laying out buttons and things like that.

Seibel: So there is beauty to be appreciated once you understand what boxes and glue means, you can say, “Yeah, that's a deep and righteous idea and I appreciate the beauty of that and see how it would apply outside this one program.” Is there further aesthetic quality that you get—and can only get—by reading through the source code and seeing how that theme plays out? Or is it more that you read the whole thing and then at the end you say, “Wow, that was really all based on this one simple, but not simplistic, idea.”?

Steele: It's a combination of those. And Knuth is really good at telling a story about code. When you read your way through The Art of Computer Programming and you read your way through an algorithm, he's explained it to you and showed you some applications and given you some exercises to work, and you feel like you've been led on a worthwhile journey. And you've seen interesting sights along the way. Wandering through the code of TeX I feel much the same way. I've learned some things about programming. And some parts of them are mundane and perfunctory and so forth. And other ones you say, “Wow, I didn't think of organizing it that way.” It's a little of each.