3

A Tour of Contextual Abstractions in Scala 3

 2 years ago
source link: https://www.signifytechnology.com/blog/2021/04/a-tour-of-contextual-abstractions-in-scala-3-by-dean-wampler
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Martin 4

A Tour of Contextual Abstractions in Scala 3 by Dean Wampler

Implicits are one of Scala's most powerful features but how do you use them?

At Scala Love In the City Conference, Dean Wampler gave us an awesome Tour of Contextual Abstractions in Scala 3!

A Tour of Contextual Abstractions in Scala 3

Implicits are one of Scala's most powerful features. This single mechanism can be used in various idiomatic ways to implement a number of capabilities, like implicit conversions. One of the biggest changes in Scala 3 is a reworking of implicits to introduce new constructs that make the capabilities more intuitive, with less emphasis on a single mechanism.

The new constructs include extension methods, a new way to write type classes, given instances with using clauses, given imports, and new implicit conversions. I'll discuss how to use them, how they contrast with Scala 2 idioms, and how Scala will gradually transition to them, supporting both implicits alongside the new features for a while.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK