~/talk

A Non-allocating Option

Talkat OCaml 2024 · on Saturday, 2024-09-07
links:none on file
slides:none on file

Adds a new optional type or_null with constructors This and Null that uses the all-zero bit pattern as a non-allocating None, keeps legacy option unchanged, and implements a kind system separating with-null vs no-null types so nesting or_null or_null is rejected. Prototype typechecker changes land in an OCaml compiler branch, runtime work remains in progress. Practical limits include banning alpha or_null arrays to avoid the flat-float non-separability problem and choosing abstract types to default to no-null to ease inference.

AI-written summary · about

  1. 0:00Non-allocating Option intro
  2. 1:25Extra allocation in Option
  3. 2:08Store values directly
  4. 3:51None vs some none
  5. 4:53Introducing or null type
  6. 6:16Demo: or null
  7. 9:28Type inference with or null
  8. 12:17Flat float arrays
  9. 15:48Banning or null arrays
  10. 16:51Implementation status
  11. 17:12Q&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.