Please log in to watch this conference skillscast.
Scala syntax is succinct, clean and easy to read, however some of the library signatures that support this are more complicated than one might expect. Type-classes use sophisticated signatures to enable clean client code. This talk is aimed at novice or intermediate Scala developers wanting to learn more about this powerful technique. We will explore what they are and how they can simplify code. We introduce the concept by examining some of the Scala collections’ library method signatures. In particular we will be looking at Ordering[T] and CanBuildFrom[-From, -Elem, +To].
Then we will explore how to solve the common problem of custom data serialisation. Initially we will present some commonly adopted approaches including the Adapter Pattern, showing their pitfalls. Then, we will show how type-classes simplify the design and result in better extensibility and and API usability.
Finally we will discover how users don’t need to understand type-classes to make use of these libraries.
YOU MAY ALSO LIKE:
- Infiniteconf 2017 - the conference on Big Data and Fast Data (in London on 6th - 7th July 2017)
- Masterclass: Reducing Technical Debt with Michael C. Feathers (in London on 21st - 22nd August 2017)
- Uncle Bob's Clean Code: Agile Software Craftsmanship (in London on 1st - 3rd November 2017)
- Fast Track to RESTful Microservices (in London on 8th - 10th November 2017)
All you don't need to know about typeclasses
Julien is a Software Engineer at Workday who has fallen in love with Scala back in 2010. Like many other computer engineers who have started their career around the beginning of the new millennium, he comes from a Java background but has quickly embraced the modular nature of Scala and he now tends to consider himself an FP advocate.