Scala-specific design patterns

The design patterns in this group could be assigned to some of the previous groups. However, they are specific to Scala and exploit some of the language features that we will focus on in this book, and so we've decided to place them in their own group.

We will focus our attention on the following:

  • The lens design pattern
  • The cake design pattern
  • Pimp my library
  • Stackable traits
  • The type class design pattern
  • Lazy evaluation
  • Partial functions
  • Implicit injection
  • Duck typing
  • Memoization

The next subsections will give you some brief information about these patterns before we properly study them later in this book.

Get Scala Design Patterns - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.