You are previewing Scala in Depth.

Scala in Depth

Cover of Scala in Depth by Foreword by: Martin Odersky... Published by Manning Publications
O'Reilly logo

Chapter 7. Using implicits and types together


In this chapter
  • Introduction to implicit type bounds
  • Type classes and their applications
  • Type level programming and compile time execution


The type system and the implicit resolution mechanism provide the tools required to write expressive, type-safe software. Implicits can encode types into runtime objects and can enable the creation of type classes that abstract behavior from classes. Implicits can be used to directly encode type constraints and to construct types recursively. Combined with some type constructors and type bounds, implicits and the type system can help you encode complex problems directly into the type system. Most importantly, you can use implicits to preserve type information ...

The best content for your career. Discover unlimited learning on demand for around $1/day.