Implicit conversions and implicit parameters we discussed previously, and they are so ubiquitous that there is a special language syntax for them, that is, view and context bounds. View bounds have been deprecated since Scala 2.11, but we believe that knowing about them will help you understand context bounds, so we'll cover both, though in different degrees of details.
View and context bounds
View bounds
The view bound is a syntactic sugar for the implicit parameter, which represents conversion between two types. It allows you to write a method signature with such implicit arguments in a slightly shorter form. We can see the difference between these two approaches by developing a method that will compare two unrelated...