Typeclasses -- a type system construct

Typeclasses -- a type system construct

Typeclasses are widely in use on advanced Scala code and yet they are not a first class citizen of the language. This talk will introduce the concept of typeclasses from the ground up by looking at languages such as Haskell and Rust.

Typeclass coherence (multiple instances of the same typeclass for the same type), effective namespacing and implicit resolution (in Scala) are some of the challenges that arise for extensive usage of this concept and language feature. We'll explore those issues and how other languages deal with them.

The focus will then shift on how to apply the learnings from other languages to improve the readability and usability of typeclasses in Scala via conventions and reliance on tools such as macro annotations. The _Cats_ and _Simulacrum_ libraries, among others, will serve as case studies and examples.

98e8177ac82d61a351b3b636e244bbd5?s=128

Andrea Lattuada

October 28, 2016
Tweet