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

Understanding Thermal Challenges in EV Charging Applications

March 28, 2024
As EVs emerge as the dominant mode of transportation, factors such as battery range and quicker charging rates will play pivotal roles in the global economy.

Board-Mount DC/DC Converters in Medical Applications

March 27, 2024
AC/DC or board-mount DC/DC converters provide power for medical devices. This article explains why isolation might be needed and which safety standards apply.

Use Rugged Multiband Antennas to Solve the Mobile Connectivity Challenge

March 27, 2024
Selecting and using antennas for mobile applications requires attention to electrical, mechanical, and environmental characteristics: TE modules can help.

Out-of-the-box Cellular and Wi-Fi connectivity with AWS IoT ExpressLink

March 27, 2024
This demo shows how to enroll LTE-M and Wi-Fi evaluation boards with AWS IoT Core, set up a Connected Health Solution as well as AWS AT commands and AWS IoT ExpressLink security...

Comments

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