Getting to Know Implicits and Type Classes

We are already familiar with two cornerstones of Scala—its type system and first-class functions. Implicits is the third one. Implicits enable elegant designs and probably no state-of-the-art Scala library is possible without them.

In this chapter, we will start with a systematic overview of different types of implicits and recap the implicit scope resolution rules. After taking a short look at context bounds, we'll move on to type classes, the central implementation mechanism that's utilized in modern functional programming libraries.

The following topics will be covered in this chapter:

  • Types of implicits
  • Context bounds
  • Type classes
  • Type classes and recursive resolution
  • Type class variance
  • Implicit scope resolution rules
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.235.62