Simon Peyton Jones Interview

A Simon Peyton Jones interview as part of the series The A-Z of Programming Languages that Naomi Hamilton has been putting together. Posting this one to the front page, not because of any bias towards functional programming, so much as it stands on its own as interesting and insightful from the standpoint of programming language design and evolution.

To supplant established languages, even in the functional programming area, like Haskell or ML or Scheme, you have to build a language that’s not only intriguing and interesting, and enables people to write programs faster, but you also need an implementation that can handle full scale applications and has lots of libraries and can handle profilers and debuggers and graphical analyzers… there’s a whole eco-system that goes with a programming language, and it’s jolly hard work building that up.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

slashdot

This article is getting discussed on /. link. Might be useful if a few lambda people jump over to /. since this is one of the rare examples where the broader community is discussing a functional article.

Thus far...

It won't help the FP evangelists, but it's apparent that those that are discussing whether Haskell should be used more didn't read the article - SPJ goes into explaining why Haskell has tried to avoid Success at all costs. From a researchers standpoint, having a small highly intelligent and motivated core of developers is good. Having too many users means that the language can't evolve rapidly - a necessary thing for research of interests. Of course, he also surmizes that Haskell is getting such a large base of users that it is already starting to slow down possible changes.

SPJ is wrong

First off, I don't think Haskell is changing all that rapidly. New stuff is being added to ghc but it seems to be adding libraries, similar to what Java does. I don't see huge changes to the Haskell core and since Haskell maintains a stable version (98) and is talking about another stable version (as per the article) I don't see the problem with rapid evolution. You can always only support a limited version in the field and have more experimental versions for the core (like Apache does).

Second, I happen to think he is incorrect in terms of popularity removing your ability to evolve. Popularity plus claims to stability do that. And that doesn't happen till there has been 5-10 years of stability and so end users assume it. To pick the two most popular programming languages: Java evolved tremendously between 1.0 and 1.4 and it was extremely popular the whole time. Perl was very popular by Perl 4 and yet Perl 5 was a complete overhaul. C# / Visual Basic .NET vs. Visual Basic 6 comes to mind as yet another example, where even though the end users wanted stability the provider did not.

Third, the proof and failings of Haskell are shown by large projects. The failed poker server showed the (then) current mode of networking just wasn't nearly complete enough and HAPS is probably possible today because of lessons learned. On the other hand XMonad proved that many of the ideas that should have worked in theory did work in practice. Going further back LOLITA showed many of the flaws in Miranda that led to Haskell.

So I'm going to come down on the (perhaps naive):
-- It is well past time for Haskell to go mainstream. Pugs proved that say the top 10% of mainstream programmers can adopt to Haskell.
-- The Haskell community should aggressively support the high prestige apps as they emerge, Haskell needs a domain. Had the community meaningfully supported Pugs Haskell could have ended up owning end user DSLs.
-- I agree with Audrey Tang: The VB/Haskell/Perl6 triad offers a platform far more powerful and flexible than Java for application authoring. This could radically change programmer efficiency.

GHC moves at lightspeed

First off, I don't think Haskell is changing all that rapidly. New stuff is being added to ghc but it seems to be adding libraries, similar to what Java does.

The version of the language that GHC handles moves far faster than the Java language in terms of the scope and rapidity of changes.

Just look at the release notes under "compiler changes visible to the user" for the last 4 major GHC releases:

6.4 11 Mar 2005 - GADTs
6.6 11 Oct 2006 - Impredictive polymorphism, bang patterns
6.8 3 Nov 2007 - various smaller changes
6.10 RC 19 Sep 2008 - view patterns, generalized list comprehensions, quasi-quotation

By way of comparison, the last language change for Java is about 4 years old now and the last major release, which was only library changes was put out 11 Dec 2006. Prior to that there were only small language additions (assert, strictfp) until you travel back in time to 1.1 (19 Feb 1997!) which added inner classes.

The relative rates of change are very deliberate choices made by the two languages and I'm not bashing either choice here. I'm just saying they can't be compared.

Java

JDK 1.0 (January 23, 1996)
Microsoft JVM (August 1996)
JDK 1.1 (February 19, 1997)
J2SE 1.2 (December 8, 1998)
J2SE 1.3 (May 8, 2000)
J2SE 1.4 (February 6, 2002)
J2SE 5.0 (September 30, 2004)
Java SE 6 (December 11, 2006)

And this was certainly a heavily used language during that period of time.

Missing the point

I have the feeling you and James Iry's are not discussing the same things. I concur with his appreciation that the only changes to Java which may be roughly as broad as GADTs or quasi-quotations are inner classes or "generics". That's only 2 changes in the last 11 years of Java. From this point of view, Haskell is infinitely more dynamic than Java.

Still not following

I'm pretty sure I'm still not be following. Java wasn't meant to be innovative in that sense. This is a mainstream language. I'd argue that AWT -> SWING -> SWT, or Servlet -> Struts -> Seam shows rapid evolution which I thought was what we were debating.

So could you expand on your point?

Expanding

So could you expand on your point?

Sure the point I'm debating was what you said earlier

I don't think Haskell is changing all that rapidly. New stuff is being added to ghc but it seems to be adding libraries, similar to what Java does.

The point I'm trying to make is that the de-facto standard for the Haskell language as defined by GHC is changing quite rapidly with annual releases that usually make significant, occasionally breaking changes to the language. Not just libraries but fundamental aspects of syntax, type system, etc. It's in that sense that the pace of evolution between the two *languages* cannot be compared.

AWT -> SWING -> SWT, or Servlet -> Struts -> Seam

All of which are library additions - and in fact most of what you mention aren't part of the standard library. Still, even if we just focus on the standard library, Java's library has gained additions at a pretty fast clip. There can be no debating that. But even there notice that Java has almost no history of removing items from the standard library. Things become deprecated but are hardly ever removed.

Hmmm - there's irony here: Java's language and library is a persistent data structure. There aren't really changes, just additions that retain the old structure. GHC's language is a much more stateful structure at least historically.

removal

So if I here you correctly you are arguing that a process of:

a) Add new feature which replaces functionality of old feature
b) Have community switch over time
c) Stop maintaining old feature

Is not change because the old feature wasn't removed?

As for your points regarding syntax, type systems... I'd agree. Java is not innovative in that sense at all, the original wasn't innovative essentially just a slightly reduced version of C++'s. No question Haskell is on the cutting edge here, but lots of other unpopular languages aren't either. This is a category in which most languages do not aim to compete at all. If we want an example of a popular language that is breaking backwards compatibility from a syntax perspective, PHP.

My point was that one can have rapid evolution regardless of the size of the base, in those aspects in which end users don't expect stability. Java users expect new widget sets but not syntax changes.

Paper

The purpose of Haskell is to produce:

1.a) Quality academic papers

1.b) Excellent academic careers for those involved.

The purpose of Java is to:

2.a) To be sold to developers.

2.b) To enable developers to write programs quickly for a platform.

They killed of Python development at the CWI in Amsterdam because it failed to meet 1.a and 1.b. They nearly killed of Erlang at Ericsson because it failed to meet 2.a and 2.b.

Having a broad user base is just not in the interest of those who develop Haskell.

Don't feed the trolls

Just a reminder to everyone tempted to respond to this post.

Exsqueeze me???

Why in God's name would you think that post is trolling?

Well...

...it is a direct appeal to ivory-tower-vs-real-world dichotomy - a sensitive subject for LtU since it has aspirations for attracting both PL researchers and PL users.

The intention may not be to troll. But the post can be easily construed as provocation.

No provocation intended

I was not thinking about ivory towers or the real world. There just is a difference between academia and industry.

When comparing the Haskell and Java committees, on the one hand you will find people who's prime concern is getting their PhDs on the right track and publishing new results, and on the other hand people who are looking at the best way of making a profit and advancing their careers.

No doubt Peyton Jones dreams of a large user-base. But the dynamics of academia dictate that he is part of research tool development, not part of building a programming language for programmers. Even the funding is totally incomparable.

Decision making in both languages is driven by substantially different interests, and it shows.

The succes of Haskell

Is proven by the fact that Java 1.2 has generics which is a spin-off of (I think the language was called) Pizza which was developed by Wadler who spent a lot of time thinking about the subject while implementing different forms in Haskell.

Yes

Yes, Wadler and Odersky. Odersky later designed Scala, and there's a lot of Haskell in Scala, so some of whatever success Scala has in the long term should be credited partly to Haskell as well.

I guess I should amend....

All PLs evolve over time (or they whither away). So I shouldn't have said that Haskell would stop evolving with a much larger user base. Rather, as SPJ points out in the article, a large user base puts a different evolutionary pressure on a PL. Rather than concentrate on changes that are of interest to pure researchers, the language starts to evolve in directions that go in areas that will consume a large part of time that are of interests to the larger population.

As to whether SPJ is wrong to want Haskell to stay lean... I would probably agree with you. It would be nice to see Haskell continue to spread. My point was that the slashdot discussion going in the direction of should I use Haskell or not, kind of gives a clue that the article hadn't been read - as SPJ specifically gives mention of why you should still learn Haskell and why he doesn't care whether you think the language requires more acceptance.

Oh. And I guess I should comment on the academia vs. pragmatic development of PLs. Personally I think that it requires balance. A PL that is developed without a large user base is basically an untested entity. However, a PL that is not a some point influenced by PLT will tend to grow in arbitrary directions and become untamed at some point.

Programming languages are like any kind of software. If you don't have any users, you don't get a full appreciation of the spectrum of your domain - so you software will be limited in usefulness. But, as I am prone to say, if we didn't have any clients, we could implement changes in a much more rapid fashion.

Excellent interview!

Thanks for posting; I enjoyed reading it.

I've delved deeply into functional programming, and the productivity wins ARE there (not across the board, mind you, because I still find myself banging out tools in Perl 5). But I find that Erlang suits me better for most things than Haskell. It has little to do with the languages themselves, including the static/dynamic typing issues.

I've gotten so used to recompiling single modules without affecting a running program, for example. Or never having to rebuild an entire project. Or the overall transparency of how high-level code uses resources (especially memory). So while I like Haskell, it always feels so klunky and unpredictable in comparison.

Another SPJ interview

I'm not sure it has already been mentioned here in LtU, but InfoQ also recorded a recent interview with Simon Peyton Jones.

I really enjoyed this

I really enjoyed this interview, and I think that SPJ is generally not naive about the evolution/adoption of haskell.

On the other hand, haskell is not actually evolving quickly. Remember that the last revision is haskell98. I think the talk of rapid evolution comes from the many GHC extensions.

Like other posters, I disagree that popularity cripples evolution. Another example is Python3, which will break backwards compatibility with Python2.

An important thing to note here, though, is that all of the languages mentioned here as having evolved are not standardized*. These languages are defined by their primary implementation.

Ossification

On the other hand, haskell is not actually evolving quickly. Remember that the last revision is haskell98.

ghc is the centre of gravity of the Haskell world. Naturally an old standard is not evolving!

SPJ talks about the role of the standard in his interview, that it is to provide an anchor for the community that is important for such tasks as teaching and exposition. There is no real need, and perhaps some risk of harm, in seriously trying to pursue a new standard right now. Recall that Paul Graham maintains that standards have an ossifying effect on language development.