Armstrong: The idea—absolutely. People keep on asking me, “What willhappen to Erlang? Will it be a popular language?” I don’t know. I think it’salready been influential. It might end up like Smalltalk. I think Smalltalk’svery, very influential and loved by an enthusiastic band of people but neverreally very widely adopted. And I think Erlang might be like that. It mightneed Microsoft to take some of its ideas and put some curly braces hereand there and shove it out in the Common Language Runtime to hit a massmarket.
Simon Peyton Jones
One of the instigators, back in 1987, of the project that led to the definition of theprogramming language Haskell, Simon Peyton Jones is a Principal Researcher atMicrosoft Research’s lab in Cambridge, England. He edited the Haskell 98Revised Report, the current stable definition of the language; he is the architectand lead developer of the Glasgow Haskell Compiler (GHC), the “de factostandard compiler” according to haskell.org; and he gave Haskell its widely citedunofficial motto: “Avoid success at all costs.”
A high-powered researcher and former professor who never got a PhD, PeytonJones values both the practical and the theoretically beautiful. He learned toprogram on a machine with no permanent storage and only 100 memorylocations, and in college he worked on both writing high-level compilers for theschool’s big iron and building his own primitive computers out of parts he couldafford on a student’s budget. But he was drawn to functional programming by aprofessor’s demonstration of how to build doubly linked lists without usingmutation and the beauty of the idea of lazy evaluation. Peyton Jones saw the ideasof functional programming “as a radical and elegant attack on the wholeenterprise of writing programs”: a way, rather than “just putting one more brick inthe wall,” to “build a whole new wall.” In 2004 the Association for ComputingMachinery elected him a Fellow, citing his “contributions to functionalprogramming languages.”
Among the topics we covered in this interview are why he thinks functionalprogramming shows increasing promise of changing the way software is written,why Software Transactional Memory is a much better way of writing concurrentsoftware than locks and condition variables, and why it is so difficult, even at aplace like Microsoft Research, to do real studies of whether different programminglanguages make programmers more or less productive.
Seibel: When did you learn to program?
Peyton Jones: When I was at school. Intel had just about produced the4004—the world’s first microprocessor. We didn’t have a 4004 or anythinglike it—it was really a chip that hobbyists could barely get at that stage. Theonly computer they had available was an IBM schools computer, which wasa strange machine built out of spare parts from mainframes. It had nopermanent storage whatsoever so you had to type in your program everytime you ran it.
It had 100 storage locations, total, which would each store, I think, eightdigitdecimal numbers. And this stored both your program and your data.So the name of the game of programming that was to simply to fit theprogram into 100 storage locations. I can’t quite remember how I got towrite my first program. I think I and one other enthusiast at the schoolspent a lot of time on the schools computer. This would have been when Iwas about 15, 1974, ’73—that kind of era.
Then after we’d been programming this machine for a little bit wediscovered there was a computer at the technical college in Swindon. So wespent an hour on a very slow bus one afternoon a week and went toSwindon where there was this enormous machine—an Elliot 803—whichlived in half a dozen large, white, fridge-sized cabinets in a room all its ownwith a white-coated operator.
After a bit the white-coated operator learned that we could figure out howto use the machine so she went away while we played with this vast engine.
It worked with paper tape and teletype so you had your program on apaper tape. We wrote in Algol, so that was my first high-level language. Youwrote your program on the tape, you edited on the tape. You wanted tochange it, you had to run the tape through the teletype, make it print out anew tape, stop it at the right place, type the new bit—an extremelylaborious way to edit your program. A kind of line editor with physicalmedium. So that was my first experience of programming. It was verymotivating.
Seibel: That wasn’t a course at school though.
Peyton Jones: Oh, no! Zero, absolutely no teaching about computers atschool.
Seibel: So it was just—“Hey kids, here’s a computer, knock yourself out.”
Peyton Jones: Absolutely. It was there in a large locked cupboard and youcould borrow the key and there it was with a screen and it just displayed afixed display of what was in the registers and these decimal numbers ofwhat was in memory locations. You could set the program and press Go.You could single-step it. That was really it. So it wasn’t even assemblylanguage programming because there was no ASCII characters at all. It wasliterally the machine code, displayed in decimal, not even in hexadecimal.
Seibel: But it had a screen?
Peyton Jones: It did have a television screen. That was its sole outputmedium.
Seibel: And what was the input?
Peyton Jones: It was a kind of touch keyboard. You touched these buttonsand they sensed that your finger touched. So that was rather sophisticated—nomechanical keys. It was some kind of capacitive thing—you touched the key andthere it was. There were a total of about 20 buttons.
Seibel: So these buttons were just for numbers?
Peyton Jones: Numbers and Go and Step. And “show me this memorylocation.” It was really extremely primitive. And all the more exciting forthat.
Seibel: I assume you had to plan your program, probably in excruciatingdetail, before you get up to this machine and start keying stuff in.
Peyton Jones: First of all you draw a flow diagram. Then you’d break itdown into instructions. Then you’d encode the instructions into this strangedigital format. And then you type in the numbers. You type in essentially an800-digit number, which is your program. And then you press Go. If youwere lucky you hadn’t mistyped one of those 800 digits and you were ingood shape. So we spent a lot of time just looking down the thing with oneguy looking at the screen and checking and the other guy saying, “Go to thenext location.”
Then when I went to university at Cambridge, microprocessors were justbeginning to take off. So there was a university computing club. There was abig university computing mainframe kind of machine, called Phoenix, with anextremely elaborate accounting system.
The time at which you used it was very significant. You were given a certainamount of units of the machine’s currency and the more memory yourprogram took, the more units you consumed; the longer your programtook, the more units you consumed. But the lower the load was, the fewerunits your program consumed. So as a result, us undergraduates, who didn’tget a very large allocation, simply spent our nights there because from about9:00 at night it became rather cheap to run your program.
So we would be there 9:00 to 3:00 a.m., writing our programs. And whatdid we write in mainly? BCPL, I think. So this again was completely hobbyiststuff. I was doing a maths degree at the time. So zero formal teaching incomputer science.
There wasn’t a whole undergraduate degree at that time either. That was 1976 to’79. There was a final year course so you could graduate in computer science.But you couldn’t do three years of computer science—you had to do somethingelse like maths or natural sciences beforehand. In fact I did maths andfinished up with a year of electrical sciences. Mainly because I thoughtcomputing was my hobby—it’d be a bit like cheating to do it as your degree aswell; degrees should be hard.