August 2018
Intermediate to advanced
380 pages
10h 2m
English
We should mention here that the requirement to use the implicit mechanism with a Rich Wrapper pattern is a requirement that's specific to Scala. Scala is a language that mixes object-oriented and purely functional styles. This is why certain functional programming features such as type classes are not a part of the language and are implemented in a more generic way instead. This means that in Scala, method injection and the type class pattern are not first-class citizens. They are not defined at the language level. Instead, they leverage a more general mechanism that is defined on the class level—the implicit mechanism. Hence, in order to seamlessly use type classes in a Scala project, you need to use this mechanism so that they take ...