How can programmers quickly and effectively learn to write idiomatic Scala? This is a question we at Underscore had to answer when developing our own training material. We knew we wanted to go beyond teaching syntax and give developers the concepts and techniques they needed to develop Scala in a systematic and idiomatic way.

We identified six core concepts that cover a wide range of Scala programs. These concepts give programmers a reproducible way to create code – once the problem domain is understood the code follows through a series of systematic and reproducible steps. The resulting code is robust and easily maintained.

In this talk I will describe these six concepts, which are:

  • expressions, values, and types;
  • objects and methods;
  • algebraic data types;
  • structural recursion;
  • functors and monads; and
  • type classes.

I will show how they let us create code in a systematic manner, and how we can go about teaching the concepts to new Scala developers. This talk should be of interest to anyone who is transitioning to, or leading a team that is transitioning to, Scala, and anyone interested in guidelines for idiomatic Scala code.