Why Perl Is Like a Human Language

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.

Wall’s background in linguistics helped him to create a programming language that borrows bits from other languages, much like English.

Ideology drives us apart. Neuroscience can bring us back together.

A guide to making difficult conversations possible—and peaceful—in an increasingly polarized nation.

Sponsored
  • How can we reach out to people on the other side of the divide? Get to know the other person as a human being before you get to know them as a set of tribal political beliefs, says Sarah Ruger. Don't launch straight into the difficult topics—connect on a more basic level first.
  • To bond, use icebreakers backed by neuroscience and psychology: Share a meal, watch some comedy, see awe-inspiring art, go on a tough hike together—sharing tribulation helps break down some of the mental barriers we have between us. Then, get down to talking, putting your humanity before your ideology.
  • The Charles Koch Foundation is committed to understanding what drives intolerance and the best ways to cure it. The foundation supports interdisciplinary research to overcome intolerance, new models for peaceful interactions, and experiments that can heal fractured communities. For more information, visit charleskochfoundation.org/courageous-collaborations.

How to split the USA into two countries: Red and Blue

Progressive America would be half as big, but twice as populated as its conservative twin.

Image: Dicken Schrader
Strange Maps
  • America's two political tribes have consolidated into 'red' and 'blue' nations, with seemingly irreconcilable differences.
  • Perhaps the best way to stop the infighting is to go for a divorce and give the two nations a country each
  • Based on the UN's partition plan for Israel/Palestine, this proposal provides territorial contiguity and sea access to both 'red' and 'blue' America
Keep reading Show less

Why a federal judge ordered White House to restore Jim Acosta's press badge

A federal judge ruled that the Trump administration likely violated the reporter's Fifth Amendment rights when it stripped his press credentials earlier this month.

WASHINGTON, DC - NOVEMBER 16: CNN chief White House correspondent Jim Acosta (R) returns to the White House with CNN Washington bureau chief Sam Feist after Federal judge Timothy J. Kelly ordered the White House to reinstate his press pass November 16, 2018 in Washington, DC. CNN has filed a lawsuit against the White House after Acosta's press pass was revoked after a dispute involving a news conference last week. (Photo by Alex Wong/Getty Images)
Politics & Current Affairs
  • Acosta will be allowed to return to the White House on Friday.
  • The judge described the ruling as narrow, and didn't rule one way or the other on violations of the First Amendment.
  • The case is still open, and the administration may choose to appeal the ruling.
Keep reading Show less