alexelcu, Scala has Type Classes as first-class citizens.
In a narrow sense, that's because instances get passed around as values. By comparison, Haskell devs talk about sometimes preferring “dictionary passing style” instead of typeclasses. In Scala, it's the same thing.
Ofc, Scala can't really force global uniqueness, AKA “coherence”, which is important for making data structures reusable & ensuring the correctness of operations on that data…
1/2
Add comment