~/talk

Scala 3, Type Inference and You!

Talkat Scala World 2019 · 2019-09-11..09-13· [scala]
slides:none on file

Scala 3 (Dotty) changes when type variables get instantiated: it delays instantiation when a type parameter appears invariant or contravariantly, chooses lower bounds for covariant positions, and instantiates only type variables constrained before implicit search to support functional dependencies (matrix×vector→vector example). It removes Scala 2’s eager-per-parameter instantiation and the ad-hoc Nothing special-case, fixing lambda and new Foo() inference bugs (foldLeft accumulator and Array/Nothing cases). The implementation is exercised via a contributors thread and compatibility tests. instantiate constrained variables only instantiation on variance

AI-written summary · about

  1. 0:00Scala 3 and type inference
  2. 2:24Compilers and typed trees
  3. 7:46Type parameter inference
  4. 19:41Scala 3 vs Scala 2 inference
  5. 25:28Advanced inference topics
  6. 39:12Union types challenges
  7. 44:39Q&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.