Projects per year
Abstract
In strict languages, laziness is typically modelled with explicit thunks that defer a computation until needed and memoize the result. Such thunks are implemented using a closure. Implementing lazy data structures using thunks thus has several disadvantages: closures cannot be printed or inspected during debugging; allocating closures requires additional memory, sometimes leading to poor performance; reasoning about the performance of such lazy data structures is notoriously subtle. These complications prevent wider adoption of lazy data structures, even in settings where they should shine. In this paper, we introduce lazy constructors as a simple first-order alternative to lazy thunks. Lazy constructors enable the thunks of a lazy data structure to be defunctionalized, yielding implementations of lazy data structures that are not only significantly faster but can easily be inspected for debugging.
| Original language | English |
|---|---|
| Article number | 261 |
| Pages (from-to) | 734-762 |
| Number of pages | 29 |
| Journal | Proceedings of the ACM on Programming Languages |
| Volume | 9 |
| Issue number | ICFP |
| DOIs | |
| Publication status | Published - 5 Aug 2025 |
Keywords / Materials (for Non-textual outputs)
- Laziness
- Defunctionalization
- Perceus
Fingerprint
Dive into the research topics of 'First-order laziness'. Together they form a unique fingerprint.-
Effect Handler Oriented Programming - extension
Lindley, S. (Principal Investigator)
1/02/25 → 31/01/28
Project: Research
-
Effect Handler Oriented Programming
Lindley, S. (Principal Investigator)
1/02/21 → 31/01/25
Project: Research