~/talk

Subtyping in Rust and Clarke's Third Law

Talkat RustFest 2016 · 2016-09-17..09-18· [rust]
slides:none on file

Claim: Rust’s subtyping lives in lifetimes and coercions not in object-like inheritance. Demonstrations use the compiler, the playground examples and macros: a hand-built unsafe cell that writes with pointers proves unsound and yields a dangling-pointer run showing garbage, while the real UnsafeCell plus the compiler’s inferred variance prevents it. The method/receiver coercions and the try macro conversions explain surprising behaviour: a nine-case grid of value/reference/mutable combos compiles except for one cell.

AI-written summary · about

  1. 0:00Intro
  2. 4:42Subtyping
  3. 12:11Sanity Check
  4. 13:51What is Subtyping
  5. 17:05Integer to Integer Examples
  6. 18:20Integer to Ceiling Examples
  7. 19:17Java
  8. 20:08Deduction Rules
  9. 20:36Contravariance
  10. 22:44Does Rust have variants
  11. 24:07A magic trick
  12. 30:08Rust Subtyping
  13. 34:36mutable references
  14. 40:31unsafe cell
  15. 42:30duck subtyping
  16. 43:17coercion
  17. 44:16automatic borrowing
  18. 45:58dereferences
  19. 50:16pop quiz
  20. 50:59variance
~/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.