read


read
or learn more

MartinOdersky take(5) toList

Aug 6, 2010

Dr. Martin Odersky, the lead designer/developer of the Scala Programming Language, Generic Java, and Pizza requires no introduction, but the motivation for this micro-interview does. That is, there is an unfortunate view in some circles that sees the existence of Scala and Clojure as somehow being at odds. In chatting with Dr. Odersky it is my hope to dispel the notion that there is a need for ill-will. I would like to quote Brenton Ashworth, as he sets the tone nicely:

We should choose languages based on how accurately they allow us to think about the problems we are trying to solve. — Brenton Ashworth

Not only is the mutual existence of Scala and Clojure important, it is indeed absolutely vital. As it happens, Clojure more closely fits the shape of my own thoughts and ways of working, but Scala serves as muse for a great minds like Daniel Spiewak and Jonas Bonér. I could continue along this train of thought, but I think that Dr. Odersky makes a better point than I could.

In order for Scala to “win”, does Clojure need to “lose”?

No, this is silly. Let’s be realistic. Functional programming is still far from being mainstream. A lot of hard work is needed to get it there. And infighting will just damage the adoption of functional programming as a whole. By contrast, any win of a functional language in an enterprise raises the credibility of all other functional languages. We should help each other, not fight each other.1

What are your thoughts about Clojure?

I have not programmed in Clojure. From what I can see it is a very well put together language, that brings the power of Lisp to the JVM in a practical package. There are things we liked so much in Clojure that we copied2 them, for instance the data structures for sequences and hash-tries. I believe there are, and will be, many other areas of fruitful cross-pollination3.

Both Clojure and Scala are clearly influenced by Haskell, ML, Chris Okasaki, and Phil Bagwell. However, are there common influences that might not be as apparent?

Erlang was the template after which Scala’s actor’s library was modeled and it might have influenced Clojure’s agents as well. Lisp, Scheme and Prolog had some indirect influences to Scala. But the tricky part of any language design in Scala is really getting the static types right, so in that sense Haskell, SML, OCaml and F# had a stronger influence. Then of course there’s Java which as the primary host language influences what’s possible in Scala and Clojure to no small degree.

Rich Hickey is as well-read in the academic papers as anyone, but it’s Scala that has gained the perception as an “academic language”. Why do you think that has happened?

I think it’s mostly people who want to put Scala down making that comment. They take my EPFL affiliation and the papers4 we publish as an excuse to attach that label to the language. What’s funny is that often senior industrial Scala programmers get also accused as being academic. All this is rather ironical because Scala is foremost an industrial language5 with many well known companies using it. By contrast it’s much less taught at universities than Haskell or Lisp, let alone Java!

I’ve found many Scala and Haskell programmers who posses an extremely acute sense of humor. Is it static typing that attracts these minds, or does it create them?

Maybe it’s the creative pauses forced on them when they wait for the type-checker to finish ;-)


  1. Emphasis mine. 

  2. A comment by Daniel Spiewak clarifies this point and leds us to an interesting ticket

  3. I think that it would be wonderful to explore the ideas in Jonas Boner’s Akka Actor framework. 

  4. A recent gem being Deprecating the Observer Pattern (PDF) 

  5. I am giving a talk at CUFP about my own experience using Scala in industry. 

14 Comments, Comment or Ping

  1. A lovely read. It’s really rather pleasant to read of positive things – especially of a positivity that crosses (programming) cultural boundaries. I only wish the interview carried on for longer :-)

    May programmers continue to look for commonalities and ways and means of sharing with each other. Life would be so much nicer that way.

  2. Nice interview! Just one minor correction: Scala didn’t actually copy Clojure’s hash trie data structures. Scala 2.8 does have a true persistent Vector, but it’s based on a widely-branching skip list rather than a hash trie. As I mention in https://lampsvn.epfl.ch/trac/scala/ticket/3724, the performance characteristics are not quite the same.

  3. Daniel,

    Thank you for pointing that out. I have amended the post. :f

  4. Fantastic (and very timely) idea for an interview and very nice of Martin Odersky to talk about collaboration between language communities. I definitely like both Scala and Clojure and the JVM world is much richer because of them.

    We need more people to remind us that if there’s any perceived “conflict” between Clojure and Scala, it’s imaginary. Programmers like to get in heated debates about the relative merits of their programming languages, despite the fact that they don’t understand what they’re criticizing (or more likely because of this fact). But the Clojure and Scala communities as a whole are a really good example of good will leading to mutual benefit.

  5. devdanke

    martin odersky sounds like a reasonable, down-to-earth guy. i appreciate it that he can compliment clojure, which many would consider a rival to his scala language. i also think he is a wise man to see that a little competition and cross-pollination between scala and clojure is best for both languages and for us programmers.

    we all know that some form of functional programming is the future of programming, due to the trend toward more and more cpu cores in computers. yet functional languages are not natural to how most programmers think. therefore, languages like scala and clojure must evolve toward something that is more natural and easy to grasp than traditional functional languages.

  6. Seems like politically correct answer from Martin Odersky. In a capitalist world one knows each player tries to take over the others except for just survival so as not to be accused of Monopoly :).

  7. I find Martin Odersky’s statement “Scala is foremost an industrial language” to be by far the most amazing part of the entire interview.

    Given that Scala is developed by a team of academic programming language researchers led by professor Odersky (who, AFAICT, has never even had a job outside academia!) funded by the state to work at an academic institute where they use it to churn out an academic paper every 7.5 months, in what sense is Scala “foremost an industrial language”?

    In contrast, Clojure is self-sustaining and is developed by an experienced industrialist. From my point of view, Scala being entirely academic and Clojure being entirely industrial is by far the most important difference between these two languages.

  8. yet functional languages are not natural to how most programmers think.

    They said the same about OOP no?

  9. Nick

    I certainly agree that it is not a zero sum game and a rise in popularity in one functional language can help the popularity of others. But you can’t say that there is no conflict at all between the languages. The two compete for developers who are trying to decide what language to invest valuable time in learning, they compete for projects whose developers are looking for a functional jvm based language to use.

  10. It is important to think in terms of paradigms and not just languages. Experience with a particular language is not very important compared to experience with a particular paradigm. Those who invest their time in learning either Scala or Clojure are gaining valuable experience in a new paradigm and are taking steps toward making functional programming feel natural. Companies that go with either Scala or Clojure will now have a larger pool of functional programmers to choose from.

    Most developers don’t get to pick the language that they use at their day job. I wouldn’t be surprised if most of us end up using both of these languages at one time or another. My advice, learn the Latin of functional languages, learn Haskell.

  11. Andreas

    It’s my firm belief that OO actually maps to the way our brains are hardwired. Abstraction is hardwired. It’s natural for people to think that way. That’s what makes OO languages successful.

    I can see the mathematical elegance of the functional approach, but I see real world programmers struggle with type errors. It’s much harder to wrap your brains around that.

    That being said, I don’t think OO is done right in popular languages either…

  12. JK

    I find Martin Odersky’s statement “Scala is foremost an industrial language” to be by far the most amazing part of the entire interview.

    I would agree with Martin. Scala is not ‘pure’ on academic sense, it is hybrid between functional and procedural programming. It does not even demonstrates new concepts, just repackages stuff which was already invented. And Scala design is centered around Java interoperability.

  13. led by professor Odersky (who, AFAICT, has never even had a job outside academia!)

    Hrm.. Odersky was lead programmer of the javac. That should count as industrial work, or?

  14. @Olle: AFAICT, Prof Odersky was not the lead programmer of javac but of an academic precursor called GJ. So that is not industrial work.

Reply to “MartinOdersky take(5) toList”