~/talk

The Inexact Superclass Problem

Talkat UNSOUND 2024 · on Sunday, 2024-10-20· [javascript]
links:none on file
slides:none on file

Claims that TypeScript’s mixin pattern for first‑class classes and dynamic inheritance is type‑unsound, and demonstrates a concrete counterexample: a mixin accepts a base whose compile‑time interface expects M(): string but at runtime the actual superclass provides M(): number, so method N() calling M() fails. Shows JavaScript/TypeScript code morphing into a runtime type error, and points to a practical fix in CP via coercive upcast proxies that hide extra methods.

AI-written summary · about

  1. 0:00Inexact superclass problem
  2. 2:29Static vs dynamic inheritance
  3. 13:56TypeScript’s dynamic inheritance
  4. 20:28Core of inexact superclass problem
  5. 25:58Concrete example and error
  6. 27:05Solutions and language design
  7. 28:50Q&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.