~/talk

A Tour of Contextual Abstractions in Scala 3

Talkat Scala Love in the City 2021 · on Saturday, 2021-02-13· [scala, functional-programming]
slides:none on file

Live REPL demos show Scala 3 replacing the old implicit mechanism with concrete features: extension methods for adding methods without wrapper objects, given instances + using for type classes and contextual params, and new implicit conversions. Examples include string and numeric monoids, a dollars/percentage conversion, and futures wrapped as context functions. A surprising runtime detail: an alias-given numeric monoid gets instantiated four times while a lazy object monoid instantiates once, which has clear performance implications.

AI-written summary · about

  1. 0:00Start
  2. 2:26Scala Book Code Examples
  3. 3:27Extension Methods
  4. 7:47Type Classes
  5. 10:31Infix Keyword
  6. 13:34Summon
  7. 17:05Implicit Conversions
  8. 24:21Context Parameters
  9. 30:00Anonymous Subclass
  10. 34:24Tight Class Derivation
  11. 34:51Strict Equality
  12. 36:52Enum Syntax
  13. 39:18Context Functions
  14. 39:48Apply Method
  15. 40:05Context Function
~/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.