Programming in Scala: A Comprehensive Step-By-Step Guide

March 5, 2008
By Martin Odersky, Lex Spoon, and Bill Venners

Scala is a relatively new programming language designed to run atop virtual machines like those used with Java or C#. It is a mixture of many ideas including those tailored for object oriented and functional programming. It incorporates an interactive interpreter and it works equally well as a scripting system and heavy-duty application platform.

The book is written by the language developers allowing them to provide insights into its operation and the reasoning behind its creation.

As with most language overviews, the book starts with a couple introductory chapters that start with examples that are easily tried using the interactive mode. The open source software can be downloaded from www.scala-lang.org.

Most of the remaining chapters are divided up by language features including the type system, inheritance, pattern matching, and actors. The presentation is in a narrative form and designed to run from start to finish although it is easy to drop into any chapter or section when using it as a reference guide.

The authors keep in mind that many readers will already be familiar with Java since this was the initial target platform. The underlying Java system also provides services that are not built into the system, but there is quite a bit in Scala, hence a rather hefty book.

I especially liked the treatment of implementations specific to Scala such as traits, mixins, and actors. These are features that are found in other languages, but Scala implementers did a bit of cherry-picking so Scala has a host of godparents. The book does a good job of covering not only the how but what and why as well. This is important if you expect to get the most out of Scala without a good bit of experimentation and exploration.

The authors assume readers have basic knowledge of Java and running Java applications at the start but later chapters like “Combining Scala and Java” delves into the lower level interface that will be valuable for using Java runtime support from Scala applications.

It definitely helps to have Scala running while reading the book just to check out the examples. As with the transition to object oriented programming, moving to Scala means changing your mindset to take full advantage of the language. This book will make that transition easier.

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!