{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,16]],"date-time":"2026-07-16T10:09:50Z","timestamp":1784196590176,"version":"3.55.0"},"reference-count":44,"publisher":"Association for Computing Machinery (ACM)","issue":"ICFP","funder":[{"DOI":"10.13039\/100014013","name":"UK Research and Innovation","doi-asserted-by":"publisher","award":["MR\/Z000351\/1"],"award-info":[{"award-number":["MR\/Z000351\/1"]}],"id":[{"id":"10.13039\/100014013","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2025,8,5]]},"abstract":"<jats:p>\n                    In strict languages, laziness is typically modeled with explicit thunks that defer a computation until needed and memoize the result. Such thunks are implemented using a closure. Implementing\n                    <jats:italic toggle=\"yes\">lazy data structures<\/jats:italic>\n                    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\n                    <jats:italic toggle=\"yes\">lazy constructors<\/jats:italic>\n                    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.\n                  <\/jats:p>","DOI":"10.1145\/3747530","type":"journal-article","created":{"date-parts":[[2025,8,5]],"date-time":"2025-08-05T16:56:02Z","timestamp":1754412962000},"page":"734-762","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":2,"title":["First-Order Laziness"],"prefix":"10.1145","volume":"9","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-3538-9688","authenticated-orcid":false,"given":"Anton","family":"Lorenzen","sequence":"first","affiliation":[{"name":"University of Edinburgh, Edinburgh, United Kingdom"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-1027-5430","authenticated-orcid":false,"given":"Daan","family":"Leijen","sequence":"additional","affiliation":[{"name":"Microsoft Research, Seattle, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-0295-7944","authenticated-orcid":false,"given":"Wouter","family":"Swierstra","sequence":"additional","affiliation":[{"name":"Utrecht University, Utrecht, Netherlands"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-1360-4714","authenticated-orcid":false,"given":"Sam","family":"Lindley","sequence":"additional","affiliation":[{"name":"University of Edinburgh, Edinburgh, United Kingdom"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2025,8,5]]},"reference":[{"key":"e_1_3_2_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/3704915"},{"key":"e_1_3_2_3_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-54458-7_31"},{"key":"e_1_3_2_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/3720423"},{"key":"e_1_3_2_5_1","doi-asserted-by":"publisher","DOI":"10.2168\/LMCS-1(2:1)2005"},{"key":"e_1_3_2_6_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0960129517000184"},{"key":"e_1_3_2_7_1","volume-title":"First-Class Phantom Types","author":"Cheney, and Hinze","year":"2003","unstructured":"Cheney, and Hinze. 2003. First-Class Phantom Types. Cornell University."},{"key":"e_1_3_2_8_1","unstructured":"Dolan. 2018. AFL Stability Fixes for Objects (MPR#7725) and Lazy Values. https:\/\/github.com\/ocaml\/ocaml\/pull\/1754."},{"key":"e_1_3_2_9_1","unstructured":"Dolan. 2021. Speed up GC by Prefetching during Marking. https:\/\/github.com\/ocaml\/ocaml\/pull\/10195."},{"key":"e_1_3_2_10_1","doi-asserted-by":"publisher","unstructured":"Ganz Friedman and Wand. 1999. Trampolined Style. In Proceedings of the Fourth ACM SIGPLAN International Conference on Functional Programming (ICFP \u201999) 18\u201327. doi:10.1145\/317636.317779.","DOI":"10.1145\/317636.317779"},{"key":"e_1_3_2_11_1","doi-asserted-by":"publisher","DOI":"10.1016\/S1571-0661(05)80538-9"},{"key":"e_1_3_2_12_1","doi-asserted-by":"publisher","unstructured":"Harris Marlow and Jones. 2005. Haskell on a Shared-Memory Multiprocessor. In Proceedings of the 2005 ACM SIGPLAN Workshop on Haskell 49\u201361. doi:10.1145\/1088348.1088354.","DOI":"10.1145\/1088348.1088354"},{"key":"e_1_3_2_13_1","doi-asserted-by":"publisher","DOI":"10.1002\/SPE.4380210306"},{"key":"e_1_3_2_14_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796897002864"},{"key":"e_1_3_2_15_1","doi-asserted-by":"publisher","unstructured":"Johnsson. 1984. Efficient Compilation of Lazy Evaluation. In Proceedings of the 1984 SIGPLAN Symposium on Compiler Construction 58\u201369. doi:10.1145\/502874.502880.","DOI":"10.1145\/502874.502880"},{"key":"e_1_3_2_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/158511.158618"},{"key":"e_1_3_2_17_1","doi-asserted-by":"publisher","unstructured":"Leijen. 2014. Koka: Programming with RowPolymorphic Effect Types. In MSFP\u201914 5th Workshop on Mathematically Structured Functional Programming. doi:10.4204\/EPTCS.153.8.","DOI":"10.4204\/EPTCS.153.8"},{"key":"e_1_3_2_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/3571233"},{"key":"e_1_3_2_19_1","doi-asserted-by":"crossref","unstructured":"Leijen and Lorenzen. Jan. 2025. Tail Recursion Modulo Context: An Equational Approach (extended Version). Microsoft Research. https:\/\/www.microsoft.com\/en-us\/research\/publication\/tail-recursion-modulo-context-an-equational-approach-extended-version\/. Under submission.","DOI":"10.1017\/S0956796825100117"},{"key":"e_1_3_2_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/3547634"},{"key":"e_1_3_2_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/3607840"},{"key":"e_1_3_2_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/3656398"},{"key":"e_1_3_2_23_1","doi-asserted-by":"crossref","unstructured":"Lorenzen Leijen Swierstra and Lindley. Jul. 2025. First-Order Laziness. https:\/\/antonlorenzen.de\/papers\/lazycons.pdf.","DOI":"10.1145\/3747530"},{"key":"e_1_3_2_24_1","doi-asserted-by":"publisher","unstructured":"L\u00f6h and Hinze. 2006. Open Data Types and Open Functions. In Proceedings of the 8th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming 133\u2013144. doi:10.1145\/1140335.1140352.","DOI":"10.1145\/1140335.1140352"},{"key":"e_1_3_2_25_1","unstructured":"Marlow and Peyton Jones. Jan. 1998. The New GHC\/Hugs Runtime System. https:\/\/www.microsoft.com\/en-us\/research\/publication\/the-new-ghchugs-runtime-system\/."},{"key":"e_1_3_2_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/1016850.1016856"},{"key":"e_1_3_2_27_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796806005995"},{"key":"e_1_3_2_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/1291151.1291194"},{"key":"e_1_3_2_29_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-79876-5_37"},{"key":"e_1_3_2_30_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796809990219"},{"key":"e_1_3_2_31_1","doi-asserted-by":"publisher","DOI":"10.1017\/CBO9780511530104"},{"key":"e_1_3_2_32_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796800000319"},{"key":"e_1_3_2_33_1","doi-asserted-by":"publisher","DOI":"10.1002\/spe.4380210505"},{"key":"e_1_3_2_34_1","doi-asserted-by":"publisher","unstructured":"Peyton Jones Partain and Santos. 1996. Let-Floating: Moving Bindings to Give Faster Programs. In Proceedings of the First ACM SIGPLAN International Conference on Functional Programming 1\u201312. doi:10.1145\/232627.232630.","DOI":"10.1145\/232627.232630"},{"key":"e_1_3_2_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/964001.964009"},{"key":"e_1_3_2_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/3453483.3454032"},{"key":"e_1_3_2_37_1","unstructured":"Scherer Bury Leroy Barnoy Munch-Maccagnoni White Sivaramakrishnan B\u00fcnzli and Frisch. 2021. Discussing the Design of Lazy under Multicore. https:\/\/github.com\/ocaml-multicore\/ocaml-multicore\/issues\/750."},{"key":"e_1_3_2_38_1","doi-asserted-by":"publisher","DOI":"10.1145\/363534.363554"},{"key":"e_1_3_2_39_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-4471-3794-8_16"},{"key":"e_1_3_2_40_1","doi-asserted-by":"publisher","DOI":"10.1145\/3408997"},{"key":"e_1_3_2_41_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796897002712"},{"key":"e_1_3_2_42_1","doi-asserted-by":"publisher","unstructured":"Shaikhha Fitzgibbon Peyton Jones and Vytiniotis. 2017. Destination-Passing Style for Efficient Memory Management. In Proceedings of the 6th ACM SIGPLAN International Workshop on Functional High-Performance Computing 12\u201323. doi:10.1145\/3122948.3122949.","DOI":"10.1145\/3122948.3122949"},{"key":"e_1_3_2_43_1","doi-asserted-by":"publisher","DOI":"10.1145\/3412932.3412935"},{"key":"e_1_3_2_44_1","unstructured":"Wadler Taha and MacQueen. 1998. How to Add Laziness to a Strict Language without Even Being Odd. In SML\u201998 The SML Workshop."},{"key":"e_1_3_2_45_1","doi-asserted-by":"publisher","unstructured":"Xi Chen and Chen. 2003. Guarded Recursive Datatype Constructors. In Proceedings of the 30th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages 224\u2013235. doi:10.1145\/604131.604150.","DOI":"10.1145\/604131.604150"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3747530","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,7,16]],"date-time":"2026-07-16T09:59:56Z","timestamp":1784195996000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3747530"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,8,5]]},"references-count":44,"journal-issue":{"issue":"ICFP","published-print":{"date-parts":[[2025,8,5]]}},"alternative-id":["10.1145\/3747530"],"URL":"https:\/\/doi.org\/10.1145\/3747530","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,8,5]]},"assertion":[{"value":"2025-02-27","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-06-27","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-08-05","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}