Scala is a relatively new programming language that was designed by Martin Odersky and released in 2003. The distinguishing features of Scala include a seamless integration of functional programming features into an otherwise objectoriented language. Scala owes its name to its ability to scale, that is, it is a language that can grow by providing an infrastructure that allows the introduction of new constructs and data types. In addition, Scala is a concurrent programming language, thus, it is a tool for today as well as tomorrow! Scala is a compiled language. Its compiler produces bytecode for the Java Virtual Machine, thus allowing the (almost) seamless use of Java tools and constructs from within scala. The language has been used to rewrite Twitter’s1 back-end services. In addition, almost all of Foursquare’s2 infrastructure has been coded in Scala. This infrastructure is used by several companies worldwide (for example, Siemens, Sony Pictures Imageworks).
The purpose of this book is twofold: first to teach the basics of Scala and then to show how Scala can be used to develop real applications. Unlike other books on Scala, this one does not assume any familiarity with Java. In fact, no previous knowledge of Java is necessary to read this book, though some knowledge of Java would be beneficial, especially in the chapter on GUI applications. On the other hand, the book assumes that readers do have a very basic understanding of programming concepts. In particular, we expect readers to be familiar with terms like compiler, interpreter, (character) string, etc. Thus, the book can be used by anyone who has done some high school computer programming.