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.

Sponsored Recommendations

Near- and Far-Field Measurements

April 16, 2024
In this comprehensive application note, we delve into the methods of measuring the transmission (or reception) pattern, a key determinant of antenna gain, using a vector network...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Empowered by Cutting-Edge Automation Technology: The Sustainable Journey

April 16, 2024
Advanced automation is key to efficient production and is a powerful tool for optimizing infrastructure and processes in terms of sustainability.

Comments

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