~/talk

First-Order Laziness

Talkat ICFP 2025 · 2025-10-12..10-18
links:none on file
links:none on file
links:none on file
slides:none on file

Proposes replacing thunk closures with lazy constructors that are defunctionalized first‑order values, implemented in Koka; evaluation happens on pattern match via a new lazy match and results use in‑place memorization plus optional in‑place reuse when reference count is one. Benchmarks (heap/queue examples) show traditional laziness can cost up to 5× in Koka, while lazy constructors cut allocations and make append‑heavy streams much faster; debugging and printing improve, but lazy match can expose memoization and break referential transparency.

AI-written summary · about

  1. 0:00First-order laziness intro
  2. 2:49Higher-order laziness problems
  3. 4:15Defunctionalizing laziness
  4. 7:25Lazy constructors in practice
  5. 9:29Benefits of lazy constructors
  6. 11:56Compiling in Koka
  7. 13:18In-place memorization
  8. 15:25Reuse vs memorization
  9. 17:13Benchmarking performance
  10. 19:01Key ideas and conclusion
  11. 19:32Q&A: Whole-program vs user control
  12. 20:37Q&A: Modularity costs
  13. 21:40Q&A: Lazy fields in OOP
  14. 22:44Q&A: Code data connections
  15. 23:45Q&A: Defining lazy functions
  16. 24:53Q&A: Impact on semantics
  17. 26:21Q&A: Non-termination in constructors
~/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.