John Washbrook, who was himself a senior academic in the department,took me under his wing and he told me something that was very important.He said, “Just start something, no matter how humble.” This is not reallyabout programming, this is about research. But no matter how humble andunoriginal and unimportant it may seem, start something and write a paperabout it. So that’s what I did. It turned out to be a very significant piece ofadvice.

I’ve told that to every research student I’ve ever had since. Because it’s howyou get started. Once you start the mill turning then computer science isvery fractal—almost everything turns out to be interesting, because thesubject grows ahead of you. It’s not like a fixed thing that’s there that you’vegot to discover. It just expands.

Seibel: So you came back into academia but you never did get a PhD. Howwas that possible?

Peyton Jones: These days getting a faculty post without a PhD would bevery hard. This must have been 1982, 1983. I applied to UCL because mysister was studying computer science there and she said, “Oh, there are acouple of lectureships at UCL, why don’t you apply?” Much to myastonishment, I was appointed. I can only assume that at the time theremust have been a desperate shortage and that anyone that could give aplausible account of himself, in a computing sense, could get hired. Becauseotherwise, how did they manage to hire somebody without a PhD?

After seven years at UCL I began to think maybe I should get a PhD. But itwas a big hassle writing a thesis, really. But, it turns out at Cambridge youcan get a PhD by special regulation, which means that you just submit yourpublished work and, with luck, they say, “You are a fine person who shouldhave a PhD.” So I was just getting geared up to do that when I gotappointed as a professor at Glasgow. Full professor. So by that time I wascalled “Professor” so nobody would know whether I had a PhD or not so Idropped the idea. Robin Milner doesn’t have a PhD; it must be adistinguished company. I’ve stuck like that every since.

Seibel: These days, is getting a PhD valuable? Someone once told me a PhDis really a vocational degree—if you want to be a professor, you’ve got toget one but if you don’t want to be a professor, there’s no point. Do youthink that analysis applies to computer science?

Peyton Jones: That part is certainly true. It’s necessary but not sufficient ifyou want to stick with research as a career—either academic or atsomewhere like Microsoft Research or Google’s research labs—a seriousindustrial research lab. You really need a PhD to get past the starting post.

If you don’t want to pursue a career in research, then I think it becomes afollow-your-heart kind of thing. You’re five times as productive if you’reworking on something that makes you enthusiastic. So if you find yourselfthinking, “I just love this and I’d just like to have some time to dig into itsome more,” a PhD is a fantastic opportunity to spend three years inBritain, or rather longer in the States, just studying something. It’s anincredible freedom really because you’re sort of a parasite on society. If youknow you don’t want to do full-time research as a career then the reason todo a PhD is because you’re just enthusiastic and inquisitive and interested.But PhDs are rather strange anyway. They force you to work on your ownand produce a substantial thesis that most people won’t read—they’ll readyour papers. So it’s an unusual research mode.

Once you’ve finished a PhD you start working much more collaborativelywith lots of other people on typically smaller, more bite-sized pieces ofwork. I think in some ways a PhD is an odd preparation, even for research.Odder in Britain because of its compressed timescale. I think in the Statesyou can be more collaborative for a while until you zero in on your ownresearch program.

Seibel: Speaking of research and academics, functional programming isquite popular within the research community but I think a lot of peopleoutside that community see functional programming as being driven by ideasthat, while neat, can be very mathematical and divorced from day-to-dayprogramming. Is that a fair characterization?

Peyton Jones: I think it’s about half fair. I characterize functionalprogramming—that is, purely functional programming, where side effectsare somehow really relegated to a world of their own—as a radical andelegant attack on the whole enterprise of writing programs. Things that areradical are by definition not evolutionary from the state of where things areat.

Today “where things are at” is that big companies are pouring immenseresources into ecosystems and editors and profilers and tools andprogrammers and skills and all that kind of stuff. The mainstream is, bydefinition, deeply practical. Meanwhile this radical and elegant stuff offunctional programming has much less of that deep, infrastructural support.But at the same time that doesn’t necessarily make it self-indulgent topursue it. Because, after all, unless some people are working on radical andelegant things you’re going to end up in a local optimum, incrementallyoptimizing the mainstream but stuck on a low hill.

So I think that one of the good things about the whole business of academicresearch is that professors can go off and do sort of loopy things withoutbeing asked how it’s benefiting the bottom line. Some will do things thatturn out to be fantastically important, and some less so; but you can’t tellwhich is which in advance! So my big-picture justification for why it’s worthsome people, like me, spending a lot of time on purely functionalprogramming, is that it shows promise. I don’t want to claim that it’s exactlythe way that everyone will be writing programs in the future, but it showspromise. And actually I’ll make the case that it shows increasing promise. Isee it as, when the limestone of imperative programming is worn away, thegranite of functional programming will be observed.

That said, I think purely functional programming started quite geeky andacademic and mathematical. The story of the last, really, 20 years—all thetime I’ve been working on it—has been a story of becoming increasinglypractical, focusing not just on abstract ideas but trying to overcome, one byone, the obstacles that prevent real-life programmers using functionalprogramming languages for real applications. The development of Haskellitself is an example of that.

It’s good that there are a bunch of people out here, maybe slightlyimpractical, who are heading towards the mainstream and maybe theperspectives you learn over here in the purely functional world can informand illuminate the mainstream. That, you can see, has happened. Lots ofstuff about type systems and generics were originally developed in thecontext of functional programming languages. It was a kind of laboratory inwhich some of those ideas were developed. Generators and lazy streamsare another example. Python has list comprehensions at the syntactic level.There are lots of individual things. Usually they’ve been rebranded andsometimes, to fit the mainstream context, they’ve been changed quite a bit.I don’t want to claim a kind of exclusive genealogy but I do think a lot ofideas have nevertheless percolated across. So it’s been useful.

Seibel: For you, what about the relation between research and actuallyprogramming?

Peyton Jones: Oh, they interact a lot. My area of study is programminglanguages. What are programming languages for in the end? They’re to makeit easier to program. They’re the user interface of programming, in effect.So programming and programming language research are deeply related.One thing we’re not good about is this: the proof of the pudding is in theeating, so you should watch programmers eating. That is, you should doproper, formalized studies of programmers programming and see what theydo. And that’s jolly expensive. And it’s also more “squishy.” It’s harder tocome up with unequivocal results.


Перейти на страницу:
Изменить размер шрифта: