~/talk

How to Totally Fix PartialFunction

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

Argument: PartialFunction breaks expectations by inheriting from Function1 and redefining apply, which weakens Liskov substitution and causes surprising runtime MatchErrors. Concrete proposals: split semantics with an explicit unsafeApply and safe apply/orElse, or remove the inheritance so Function1 and PartialFunction are distinct, or implement PartialFunction on an unboxed Option/opaque type to avoid boxing. Notes: small compatibility fixes already merged for 2.13, full migration costs and compiler/typechecks are the main obstacles.

AI-written summary · about

  1. 0:00Introduction
  2. 2:54Agenda
  3. 3:44Definitions
  4. 8:33PartialFunction
  5. 15:07Partial Function When
  6. 17:51Implementation
  7. 25:56Partial Functions
  8. 27:20Proposal
  9. 31:36Proposed Solution
  10. 37:22Alternative Solution
~/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.