This document aims to show and compare three alternatives for achieving polymorphism in Scala.
- Subtyping, common in object-oriented languages like Java.
- Duck typing, common in dynamically typed languages like Python.
- Typeclasses, common in functional languages like Haskell.
Additionally, when implementing the typeclass pattern in Scala,