~/talk

IMPLICITS IN SCALA 3

Talkat Scalar Conference 2023 · 2023-03-23..03-24· [scala]
slides:none on file

Scala 3 replaces the single implicit keyword with three concrete mechanisms and shows how they solve real problems: extension, using, given replace ad-hoc implicits with built‑in extension methods, explicit context parameters (multiple and anonymizable), and named or anonymous synthesizable instances. The compiler gives clearer diagnostics, givens are lazy by default, summon replaces implicit, and imports require import a.given / wildcard excludes givens so implicits no longer silently leak into scope. Examples include deriving HttpResponse[Option[T]] from HttpResponse[T].

AI-written summary · about

  1. 0:00Scala 3 implicits intro
  2. 1:03Scala 2 implicits flaws
  3. 3:29Scala 2 implicit patterns
  4. 6:21Why Scala 3 redesigned implicits
  5. 8:28Scala 3’s contextual changes
  6. 9:11Extension methods in Scala 3
  7. 11:20Using clauses replace params
  8. 13:07Clarity with using clauses
  9. 17:03Given replaces implicit defs
  10. 18:50Better errors with given
  11. 19:54Import syntax for givens
  12. 22:00Type classes in Scala 3
  13. 25:14Scala 2 vs Scala 3 implicits
  14. 26:58Final thoughts on Scala 3 implicits
  15. 27:40Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.