Implementing a typeclass using type parameters versus abstract types
问题 Following on from Witness that an abstract type implements a typeclass I've tried to compare these two approaches side-by-side in the code snippet below: // We want both ParamaterizedTC and WithAbstractTC (below) to check that // their B parameter implements AddQuotes abstract class AddQuotes[A] { def inQuotes(self: A): String = s"${self.toString}" } implicit val intAddQuotes = new AddQuotes[Int] {} abstract class ParamaterizedTC[A, _B](implicit ev: AddQuotes[_B]) { type B = _B def getB(self: