Typeclasses as objects and implicitsMushtaq Ahmed
schedule 2 years agoSold Out!
Haskell has populairzed typelcasses a principled way to add ad-hoc extensions on existing data types. They allow you to 1) add new operations on existing data types and 2) support new data types on existing operations, and thus solve the famous "expression problem".
There is a lot of similarily between typeclasses and Java good practices of programming to interfaces and preferring composition over inheritance. The missing link is the implicit dictionary passing which allows haskell to be much more concise and expressive.
In this tutorial, we will look at how Scala adopts typeclasses by adding the missing link of implicits.