This book is the authoritative tutorial on the Scala programming language, co-written by the language's designer, Martin Odersky. This fifth edition is a major rewrite of the entire book, adding new material to cover the many changes in Scala 3.0. In fact we have added so much new material that we split the book into two volumes. This volume is a tutorial of Scala and functional programming. The second volume, which will be released as a PrePrint™ soon, is a deep dive into advanced aspects of Scala 3.
The changes and new features covered in this version of this PrePrint™ include:
Quiet (indentation-sensitive) control syntax
Intersection and union types
Enums and Algebraic Data Types (ADTs)
Context parameters and given instances (the new approach to implicit parameters)
Trait parameters
Creator applications
New vararg pattern syntax
Extension methods