Talk

Typeclasses from the ground up

When it comes to typeclasses and implicits – the mechanism used for implementing this pattern in Scala – there appears to be a big gulf: They are widely used not only in many popular Scala libraries, but also in the standard library. On the other hand, many Scala developers are not familiar with them or find them too daunting.

Since it is difficult to evade them when writing real world Scala code, I would like to encourage developers adopting Scala to overcome their fear of implicits and instead embrace the typeclass pattern. At the same time, I want to raise awareness of the problems that can arise when you do so too eagerly.

In this talk, as an intermediate Scala developer, you will learn typeclasses from the ground up: What they are good for and how they compare to what you are familiar with from object-oriented languages, when you should and should not use them, how the pattern can be encoded in Scala and how to write your own typeclasses, how to provide instances of typeclasses for your own or existing types, and how to do all of this with minimal boilerplate. Throughout the talk, you will see numerous examples of typeclasses used in the Scala ecosystem and the standard library, and you’ll see that you don’t need to know anything about category theory to benefit from embracing type classes.

Date
2016-09-28
Time
19:30 - 00:00
Conference / Event
Honeypot Tech Meetup: Staying functional with Scala
Venue
TechCode Accelerator, Karl-Liebknecht-Str. 5, Berlin