What is Scala?

Written on 11:30 AM by Robert

Scala is an object-oriented language that can be used in the Java and .NET platforms.  Released in 2004, it has slowly gained strength and popularity.  Early this year, Twitter announced it has changed part of its backend to Scala in increments.

But why is Scala so hot lately?  Twitter developers Steve Jenson, Alex Payne, and Robey Pointer sat down for interview earlier this month, where they explained why they chose to move away from Ruby on Rails and use Scala.  Here's some of what they had to say:

Steve Jenson:  "One of the things that I’ve found throughout my career is the need to have long-lived processes. And Ruby, like many scripting languages, has trouble being an environment for long lived processes. But the JVM is very good at that, because it’s been optimized for that over the last ten years. So Scala provides a basis for writing long-lived servers, and that’s primarily what we use it for at Twitter right now. Another thing we really like about Scala is static typing that’s not painful..."

Robey Pointer:  "Also, Ruby doesn’t really have good thread support yet. It’s getting better, but when we were writing these servers, green threads were the only thing available. Green threads don't use the actual operating system’s kernel threads. They sort of emulate threads by periodically stopping what they are doing and checking whether another “thread” wants to run. So Ruby is emulating threads within a single core or a processor. We wanted to run on multi-core servers that don’t have an infinite amount of memory... I think of it as, the higher the level of the programming language, the less you have to type to do more. To me, languages like Ruby, Scala, and Python are very high level, because you can write a few lines of code to do what might take ten or twenty lines in Java, or 250 lines in C."

So they incorporated Ruby with Scala on Twitter.  This language is a good direction to head towards if you already know Java.  So as a developer, how do you get started learning Scala?


Steve Jenson: "Just try it. Make a starter project. Go for it."

Alex Payne: "There’s great code on GitHub. There’s a growing Scala community there. David Pollak and the rest of the Lift committers have put Lift on GitHub."
  

- I don't know about you, but I think I'm going to give this language a look.  Thoughts? Edit

If you enjoyed this post Subscribe to our feed
free web site hit counter