Culture / Technology / Top Stories /

Larry Wall’s Quest for a 100-Year Programming Language

22 Oct 2017 6:00am, by

Larry Wall (smiling) on Perl 6 - March 2017

The programming language Perl celebrates its 30th anniversary in two months. And the programming language Erlang had its 30th anniversary back in 2016. So it might be illuminating to check out this talk earlier this year that Larry Wall, the 63-year-old creator of Perl, had with Joe Armstrong, the 66-year-old co-creator of Erlang to look to future — as well as to discuss what a long, strange trip it’s been.

“It meant that we’d been through the same generational shift in hardware,” Armstong told the crowd at Erlang and Elixir Factory SF Bay Area 2017 conference, remembering the “dimensions” of early computers which remained fixed in his memory. “One limit that took a long time to break was this 1.44MB limit of the floppy disk. And for a long time, development increased to the point where you got to 1.44MB — and then you stopped.”

“I had a smaller limit than that,” Wall remembered. “When I was first sending out programs, Usenet articles could only be 32K characters. So if you wanted to send out software then, you had to have a little program that would split your program up into separate files that could then be glued back together…”

But while taking the long view, he also shared his own history of Perl, starting with his fateful decision to break backward compatibility in 2000 to develop an entirely new language called Perl 6 — which famously took 15 years before a stable version was finally released. And Wall says one of his big inspirations was a 2003 essay by computer scientist Paul Graham envisioning “The Hundred-Year Language.” What would that involve?

“It has to do with whether it can be extensible, whether it can evolve over time gracefully.”

Wall is a trained linguist, and in writing Perl — and in his quest for a hundred-year language, he may have been mimicking the expressiveness of our human (or “natural”) languages, Wall triumphantly suggested, pulling up a slide of bulleted points.

  • Languages evolve over time. (“It’s okay to have dialects…”)
  • No arbitrary limits. (“And they naturally cover multiple paradigms”)
  • External influences on style.
  • Fractal dimensionality.
  • Easy things should be easy, hard things should be possible.
  • “And, you know, if you get really good at it, you can even speak CompSci.”

In a short presentation, Wall showed off some of Perl 6’s new tricks — including its support for the most basic units of all language (with the appropriate under-the-hood mapping). At one point he demonstrates that infinity can actually be written with the Unicode symbol — an eight on its side — or with Inf. Perl 6 can convert curly quotes into straight quotes — and even European-style closing quotes. It handles superscripts and subscripts. And while Perl 6 ships with a special sequence-recognizing operator … it will even recognize the Unicode symbol for the ellipse.

“If you happen to want to write your numbers in Tibetan, that works. Or cuneiform. This just all falls out of Unicode. I mean, they just supply this, so it’s trivial to hook it up, really…”

There’s also some attention to the language of mathematics. (Unlike Perl 5, you can add .1 and .2 to get .3, since Perl 6 treats them as rational numbers — a fraction — rather than as floating point approximations.) And “Because it’s a rational number, 10.0 and 10 can be used interchangeably” — which is not always the case in every language.

Wall is hoping for longevity — something that isn’t common for most programming languages. “Either your language is too brittle, and people just invent different languages that do the same thing with different syntax, or your language is too mushy, and it just becomes a mess — kind of like some Perl 5 did unless you’re disciplined. So to avoid either of those big mistakes… we are very strict about our linguistic model. And so we think that that will help us over the long-term to be more what Paul Graham was talking about when he talked about a 100-year language.”

To get an idea of how daunting this challenge is, look at how dramatically the world has changed over the last half-century or so. Armstrong told the crowd he’d started out in a world where you had three choices when learning computer programming: COBOL, Fortran or assembler. Armstrong chose Fortran and remembers a three-week turnaround time for actually running programs in those precious idle moments on the mainframe computer. “The first week, you did it on the coding forms, and then you sent it off, and then…”

Perl creator Larry Wall and Erlang co-creator Joe Armstrong - March 2017

Wall had his own memories of batch processing COBOL programs — and of slacking off during one class and then reading the entire IBM COBOL manual the night before a test.

But interestingly, more than four decades later Perl 6 can actually drop down into COBOL — among other languages — swapping in the appropriate parser at just the moment it’s needed. “So it’s very clean linguistically.

“And this buys us a lot of power that we think will eventually control that divergence that happens to all languages.”

It’s a point Wall returned to later in his talk. “There really is no one True Language,” Wall told the crowd. Not even Perl 6, which he calls a “braid” of sublanguages which interact with each other — and which can all be modified by the user. For example, in Perl 6 it’s possible to redefine operators — a new corresponding parser is provided automatically. Programmers can also adopt a style which doesn’t use sigils to identify variable types.

“We’ve unified functional programming and object-oriented programming. They’re just all functions with different dispatchers.”

In 1999 Wall described the original Perl as “the first postmodern computer language” — avoiding monoculture for an eclectic mix of tools. “Perl is humble,” he argued then. “It doesn’t try to tell the programmer how to program. It lets the programmer decide what rules today, and what sucks.”

But Perl 6 takes things even further. Besides being “linguistically malleable,” Wall also noted Perl 6 is also “representationally polymorphic,” where objects can be represented in a variety of programming styles — for example, a Python object, a Ruby object, or even a struct from C. “That makes it very easy to interoperate with other languages we can talk to.”

At this point, Joe Armstrong imagined a world 300 years into the future, “When all these programmers have to read legacy Erlang and legacy Perl… It’ll be like the ancient hieroglyphics. Nobody would dare change it because it all works. ‘Oh, who are those horrible people who did this to us.'”

Wall responded wryly that “Fortunately, I’ll be dead by then.”


A digest of the week’s most important stories & analyses.

View / Add Comments