location_city Online schedule Mar 25th 04:00 - 04:45 PM IST place Zoom people 21 Interested

Type classes are a powerful tool in functional programming to enable ad-hoc polymorphism without using object orientated programming based constructs like sub typing. In this talk we look at how to create type classes using Scala 3 constructs such as ‘Givens’ and ‘Extension’ methods.

 
 

Outline/Structure of the Talk

  1. Recap of classical Polymorphism (subtyping) - 3 minutes
  2. Concept of Ad-Hoc polymorphism in Scala via typeclasses -  5 minutes
  3. Typeclasses before Scala 3 i.e implicits  - 5 minutes
  4. Implicit hell problem - 2 minutes
  5. Scala 3 extension methods  - 10 minutes
  6. Scala 3 given constructs - 10 minutes
  7. Using extension methods and given constructs to create type classes  - 5 minutes
  8. Questions - 5 minutes

Learning Outcome

  1. Audience will clearly understand the concept Ad-Hoc polymorphism in Scala
  2. Audience will understand on how we implement ad-hoc polymorphism in Scala 3.
  3. Audience will appreciate improvements in Scala 3 over Scala 2.

Target Audience

Scala developers looking to learn Scala 3 aka Dotty features

Prerequisites for Attendees

- Concept of Polymorphism

- Basic scala knowledge

Video


schedule Submitted 6 months ago

Public Feedback

    help