Wall’s background in linguistics helped him to create a programming language that borrows bits from other languages, much like English.
Question: Did your study of linguistics play a role in Perl’s development?
Larry Wall: Yes, it did, indeed. My linguistics training...I wasn't intending to write a computer language when I took the linguistics training. It was really, my wife and I were actually intending to be missionaries, so it was very practical linguistics, in terms of field linguistics. We were going to go out and learn a language that had not been written before and produce a writing system for it and do translations into the language, but I developed a bunch of health issues that prevented me from doing that. So instead, I went on into industry and used some of my computer skills, but my interest has always been in the way languages work and I written compilers before Perl, and so when the time came that I had a problem that I couldn't solve with any of the tools I already had, I just said, "Well, I can do better than that." So I took some of the ideas that I had used in my previous languages and I took ideas from other languages and I shoved them all together in one spot and I, then I decided, "Well, I, you know, this isn't just for myself, I'd like it if other people used what I do," so I sent it out and other people liked it to, and it just grew from there.
But the design all along has been to pull things together in almost a random way, the way in natural languages, you know, English pull stuff from Viking and French and Anglo-Saxon and what have you, even a little Japanese in there—a skosh. But the say a natural language is put together like that always fascinated me and so I'm interested in, not in a shallow linguistic sense, you know, the old Cobalt language sort of had stock phrases that you plugged things into it, that was sort of cargo-cult natural language.
Perl is more on a deep, fundamental level, how do people use language, how do they expect it to be extended, how it would evolve over time, who gets to contribute to the changes in the language. All these on a deep level, Perl is much more like a natural language than most computer languages.
Question: How are human languages and programming languages similar?
Larry Wall: Well, human languages tend to be much more ambiguous than computer languages because humans are much smarter about interpreting the context. So there is a scale of how much a computer language resembles human language and primarily based on how much context is involved. If there's very literal context, it's very literally, there's some computer languages that are like that. And then other languages know a little bit more about, you know, what has been stated earlier in the program, or what the immediate surroundings are in the program, and Perl kind of takes this to more of an extreme, not as far as human languages, because no computer is smart enough to understand human speech in that way, yet.
But they are all, you get things happening that happen the same in human languages: you get dialects, you get languages that get smooshed together so you get Creoles and pidgin languages. And you get languages that you think ought to be understandable to two different people, but they aren't. You get languages that have the same name, but are different from each other. You get languages that have different names, but are really essentially the same language. So all the processes that happen as natural languages evolve through time, it happened in computer languages, too.
Now, there are some other differences. Natural languages generally are not designed by humans, they're just designed by the participants and you say something new and somebody else says, "Oh, that's a cool way to say it," and the next thing you know, everyone is saying it because it's shiny. There's one. But computer languages tend to have explicit designers, but if a computer language is well designed, the computer language designer stays out of the face of the programmer and gives the programmer ways, various ways of having the flexibility that they would have in natural language, to pick one way of saying things or another. And to the extent that they can give that flexibility, sort of give an artistic medium to the programmer to be creative, to that extent, people can take great joy in writing a computer program in the same way they might take great joy in writing a great poem or a play.