Type Parameter Power-Up! Variance, Bounds, and Inference

16. Květen 2018

Řečníci

O prezentaci

Adding type parameters to classes is a powerful way to reuse code in Scala. By leveraging variance, type bounds, and higher-kinded types we can add further control and power to this reuse. We will learn how to use variance and type bounds to refine a type, how these types are inferred, and how higher-kinded types and type bounds combine with implicit resolution to give rise to the typeclass pattern, which helps bridge the gap between Scala's object-oriented and functional programming sides. We will also see how these features are evolving in future versions of Scala and Dotty. Required knowledge This talk assumes attendees have some exposure to type parameters and parameter inference, but will provide a brief review of this material. Learning objectives Attendees will learn how and when to apply variance and type bounds to their data structures to achieve better reuse. They will learn how to interpret and address compiler errors related to variance and type parameter inference. I've been coding in Java since the early days of the language, and in Scala for the last 5 years. My main areas of focus are in microservices and reactive approaches. I am always looking for Scala and general functional programming techniques help to achieve expressive, reusable code that is easy to understand and pleasant to work on. As our organization is a polyglot development environment, I'd also love to talk to you about adopting and evangelizing Scala within a receptive organization.

Organizátor

Kategorie

O organizátorovi (Scala Days)

Scala Days brings together developers from all corners of the world to share their experiences and new ideas around creating applications with Scala and related technologies, like Spark, Kafka, and Akka. Scala Days provides a unique opportunity for Scala users to interact with the contributors to the language and related technologies and connect with fellow developers.

Uložení prezentace

Měla by být tato prezentace uložena po dobu 1000 let?

Jak ukládáme prezentace

Pro uložení prezentace do věčného trezoru hlasovalo 0 diváků, což je 0.0 %

Sdílení

Doporučená videa

Prezentace na podobné téma, kategorii nebo přednášejícího

Zajímají Vás podobná videa? Sledujte Scala Days