In Scala, there are a couple of different mechanisms hidden behind the keyword implicit. This list contains implicit parameters, implicit conversions, and implicit classes. They have slightly different semantics and it is important to know in which situations which one is the best fit. Each of these three types deserves a brief overview.
Types of implicits
Implicit conversions
The first type of implicit in our list is implicit conversion. They allow you automatically to convert values of one type into values of another type. This implicit conversion is defined as a one-argument method that's marked with the implicit keyword. Implicit conversions are considered to be a somewhat controversial language feature (we will take...