Core concept

trait Show[T] { def show(t: T): String }
given Show[Int] with { def show(t: Int) = t.toString }
Advertisement

How it works

Learning curve. Type inference sometimes tricky.

Advertisement

Trade-offs + gotchas

Extensible libraries. Polymorphic code.