Martin Odersky: Geek of the Week

Comments 0

Share to social media

2357-odersky.jpg

Martin Odersky is a professor at Ãcole Polytechnique Fédérale de Lausanne EPFL a research university in Lausanne, Switzerland, that specialises in physical sciences and engineering. He has been working on programming languages for most of his career, but first studied structured and object-oriented programming as a PhD student of the Turing award winner Niklaus Wirth, the author of Pascal.

Martin was immersed with functional programming while working as a post docorate at IBM and Yale and when Java was first marketed, he started to add functional programming constructs to the new platform. This led to Pizza and GJ and eventually to Java 5 with generics. During this time he also developed javac, the current reference compiler for Java. Over the last decade, Martin has worked on unifying object-oriented and functional programming in the Scala language.

Scala quickly developed from being an academic language to become a popular open source tool and is use by thousands of developers. He oversees development of Scala as head of the programming group at EPFL and as chairman of Typesafe, a business which provides an Open Source platform for building applications for the Java Virtual Machine.

RM:
Martin, what was the itching need which led you to develop Scala?
MO:
I had been working with programming languages almost all of my professional life. I did my PhD in Zurich with Niklaus Wirth, the designer of Pascal and Modula-2, in the 80s. I then was very interested in functional programming and thought it was the way forward.

When Java came out in 1995, it looked very promising to me and some of my colleagues because of its portable runtime and its garbage collector, which are key elements for supporting functional programming.

We decided to add some functional elements in a language extension of Java, which was called Pizza. This was a name we thought would appeal to hackers. We thought if Java is a hackers drink, then we want to have a name like hackers’ food – and that was Pizza.

That way, I got involved a lot in Java, having co-designed the first version of generics and written the “javac” compiler. Then about 10 years ago I felt we’ve pushed it as far as we could, and it was very difficult to push it anywhere further because of the many constraints imposed on us by backwards compatibility and legacy code.

I thought maybe we could take a clean sheet approach and do the same thing once over and incorporate functional programming, but without being held back by the constraints of Java. This led us to develop Scala.

At first, this was an experiment, to answer the question whether we could achieve a tight integration between functional and object-oriented programming and whether this would lead to a useful programming model and language.

When we realised that we could achieve this integration and that it was useful, we continued working on it. Scala developed more and more into an open source environment and then a commercial language where we could have commercial support.

RM:
So why settle for the name Scala? Has it anything to do with the opera house in Milan?
MO:
It stands for scalable language. Before that, we considered a couple of other names. There was a previous language called Funnel but that was never intended to be practical and for an end user. At some point we considered to name it Clay. In fact I have now found out that name has been taken. The idea behind that was that things were supposed to be easily modelled in the language.
RM:
Looking through your biography I see you started working on Scala in 1999. When was the initial design started?
MO:
When I joined EPFL (Ãcole polytechnique fédérale de Lausanne) in 1999 after moving back to Europe from Adelaide, Australia, I then had the environment and the elbow room to do something a bit more long term.

The initial Scala design was done in 2001 and the language came out in 2003, the first iteration of the language. At this stage the language was only being used by my students and a couple of external users.

I was committed to teaching a course in functional programming and I wanted to use the language from day one in that course. The first class I had were pretty much our guinea pigs, where we tried out a couple of language variants and observed how the class worked with them.

RM:
Since the first iteration what changes have you made to Scala?
MO:
There have been some redesigns when the Scala two series came out and some minor Syntax changes done after that, and there was a major feature called “extractors” that was added in 2006. For the last three years we’ve kept the language pretty stable and have focused mostly on the libraries. We expect to have a new trait encoding out in January 2016.
RM:
What was the biggest challenge with the language when you developed it?
MO:
Well, to come up with a statically-typed programming language that provided a fusion of object-oriented and functional programming. This turned out to be unknown terrain, certainly for me and also for other people in the industry. Then, having a language that’s different to Java but at the same time can work well with Java was also a big challenge that we faced.
RM:
Is Scala still used as the programming language behind Twitter? Did you intend for Scala to be used on social networking sites?
MO:
Scala is used in more and more projects inside Twitter. Initially we didn’t target Scala to be a language for social media so it came as a surprise that Twitter was an early adopter of the language.

A lot of social media sites start off with a dynamic language of some sort, like in the case of Ruby, but some run into scalability problems. Scala keeps much of the feel of a dynamic language even though it is statically typed so it tends to appeal to people who come from dynamic languages.

RM:
If you could go back in time, what would you change anything about the language?
MO:
Apart from a few minor details, there is nothing major I would change. The one thing I’m not sure of, is whether I would keep XML literals – they are undoubtedly very very useful now, but they haven’t become as predominant as we thought they would become at the time we designed Scala.
RM:
Are any students studying programming languages being taught Scala?
MO:
At EPFL, I’ve been teaching it for eight years now, in a number of courses, and other universities are now starting to teach it, too.
RM:
What advice would you have for up and coming programmers?
MO:
I would say two things: Don’t be afraid to try new things because nothing is cast in stone, and it’s very good to go to the bottom of things to understand how they work.
RM:
What’s coming up next for you?
MO:
There are a couple of big challenges. The obvious next challenge is to work out what to do with all of these cores in modern processors. We need to make concurrent and parallel programming accessible to many more people.

That’s a big big challenge and something the whole industry will need to work at.

Another thing is to work out how to make a programs more reliable than they are now. And that’s very much an ongoing process, but we make steady advances and it will take a while to crack it, if we can ever crack it completely.

Load comments

About the author

Richard Morris

See Profile

Richard Morris is a journalist, author and public relations/public affairs consultant. He has written for a number of UK and US newspapers and magazines and has offered strategic advice to numerous tech companies including Digital Island, Sony and several ISPs. He now specialises in social enterprise and is, among other things, a member of the Big Issue Invest advisory board. Big Issue Invest is the leading provider to high-performing social enterprises & has a strong brand name based on its parent company The Big Issue, described by McKinsey & Co as the most well known and trusted social brand in the UK.

Richard Morris's contributions