~/talk

Type Parameter Power Up Variance Bounds and Inference

Talkat Scala Days Berlin 2018 · 2018-05-14..05-17· [typescript]
links:none on file
slides:none on file

A practical walk through why Scala’s variance rules matter: a real system uses a free monad workflow and hits the error covariant type A occurs in contravariant position when wrappers and keeper-like APIs mix +/− annotations with method args and returns. Examples show invariant/covariant/contravariant wrappers, why prepending widens List[Int] to List[Any] via lower/upper bounds, and how context bounds introduce implicit evidence parameters to enable type class derivation. Compiler messages are often unhelpful but Scala 3 keeps the same semantics.

AI-written summary · about

  1. 0:00Start
  2. 1:21Why Should Users and any Api Designers Learn about these Kinds of Topics
  3. 2:42Overview
  4. 3:03Inheritance and Substitution
  5. 4:06Liskov Substitution Principle
  6. 12:20Contravariant Wrapper
  7. 14:07Contravariance
  8. 28:49Constraints and Type Classes
  9. 30:26Bounds and Variants
  10. 33:32View Bounds
  11. 33:56Context Bounds
  12. 34:49Psych Class Pattern
~/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.