Odersky: It felt like it would be the right thing to do, to have very complementary strengths. So functional programming is in a sense very clean, it can be very powerful. It makes it very easy to construct things out of simple elements. Object-oriented programming has a very good story when it comes to essentially the evolution of large systems. It can subclass, you can specialize existing systems. I always felt it would be very interesting to combine the two, and I think the success of Scala has shown that yes indeed, there is something there.
InfoWorld: The term "functional programming" -- it seems so vague.
Odersky: Programs are composed of essentially variables and operations of those variables and functions that operate on those variables. Functional programming means put the functions first. That means emphasize programming purely with functions that map input to input values into results and de-emphasize mutating variables. At first glance, it's a very mathematical model of programming, you might say, because that's really the mathematical approach. It actually turns out now that it's also a very good approach if you want to deal with concurrency and parallelism.
InfoWorld: Why did you redesign the language in 2005? What was the problem with the original design?
Odersky: There was no major problem. It was just that essentially we did the first iteration, and after two years, we noted that there were some minor syntax things where we said -- well, actually we found ways to express [that] more elegantly, and over the years, we added new things, like more generalized pattern matching. But the main point in 2005 was that we rewrote the compiler. The first complier for Scala was written in Java, and the second compiler that came out in 2005 was bootstrapped, written in Scala itself. We decided to do some little design changes. At the time, Scala didn't really have many outside users yet, so it was very easy to do.
InfoWorld: Why did you want to use the Java Virtual Machine for Scala?
Odersky: Two reasons. The first one is my personal experience. I've been on the JVM from the time it was still in alpha. I actually wrote, I think, the second Java compiler in 1995. That compiler then with twists and turns, eventually became Java C, so the standard Java compiler. I also found that the JVM would be an excellent target because of essentially two things. The first is it was a high-performance runtime, and the second thing is it had a garbage collector. Scala is object-oriented and functional; a high-performance garbage collector is absolutely essential to make this run well.
InfoWorld: What types of applications are ideal for development with Scala?