{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,4,11]],"date-time":"2026-04-11T02:12:45Z","timestamp":1775873565760,"version":"3.50.1"},"reference-count":22,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA","license":[{"start":{"date-parts":[[2020,11,13]],"date-time":"2020-11-13T00:00:00Z","timestamp":1605225600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100001711","name":"Schweizerischer Nationalfonds zur F&#x00F6;rderung der Wissenschaftlichen Forschung","doi-asserted-by":"publisher","award":["200021_166154"],"award-info":[{"award-number":["200021_166154"]}],"id":[{"id":"10.13039\/501100001711","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":[[2020,11,13]]},"abstract":"<jats:p>\n            Every newly created object goes through several initialization states: starting from a state where all fields are uninitialized until all of them are assigned. Any operation on the object during its initialization process, which usually happens in the constructor via\n            <jats:italic>this<\/jats:italic>\n            , has to observe the initialization states of the object for correctness, i.e.\u00a0only initialized fields may be used. Checking safe usage of\n            <jats:italic>this<\/jats:italic>\n            statically, without manual annotation of initialization states in the source code, is a challenge, due to aliasing and virtual method calls on\n            <jats:italic>this<\/jats:italic>\n            .\n          <\/jats:p>\n          <jats:p>Mainstream languages either do not check initialization errors, such as Java, C++, Scala, or they defend against them by not supporting useful initialization patterns, such as Swift. In parallel, past research has shown that safe initialization can be achieved for varying degrees of expressiveness but by sacrificing syntactic simplicity.<\/jats:p>\n          <jats:p>\n            We approach the problem by upholding\n            <jats:italic>local reasoning about initialization<\/jats:italic>\n            which avoids whole-program analysis, and we achieve\n            <jats:italic>typestate polymorphism<\/jats:italic>\n            via subtyping. On this basis, we put forward a novel type-and-effect system that can effectively ensure initialization safety while allowing flexible initialization patterns. We implement an initialization checker in the Scala 3 compiler and evaluate on several real-world projects.\n          <\/jats:p>","DOI":"10.1145\/3428243","type":"journal-article","created":{"date-parts":[[2020,11,24]],"date-time":"2020-11-24T23:40:14Z","timestamp":1606261214000},"page":"1-28","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":8,"title":["A type-and-effect system for object initialization"],"prefix":"10.1145","volume":"4","author":[{"given":"Fengyun","family":"Liu","sequence":"first","affiliation":[{"name":"EPFL, Switzerland"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Ond\u0159ej","family":"Lhot\u00e1k","sequence":"additional","affiliation":[{"name":"University of Waterloo, Canada"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Aggelos","family":"Biboudis","sequence":"additional","affiliation":[{"name":"EPFL, Switzerland"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Paolo G.","family":"Giarrusso","sequence":"additional","affiliation":[{"name":"Delft University of Technology, Netherlands"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Martin","family":"Odersky","sequence":"additional","affiliation":[{"name":"EPFL, Switzerland"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2020,11,13]]},"reference":[{"key":"e_1_2_2_1_1","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009866"},{"key":"e_1_2_2_2_1","volume-title":"Efective Java","author":"Bloch Joshua","unstructured":"Joshua Bloch . 2008. Efective Java ( 2 nd Edition) (The Java Series) (2 ed.). Prentice Hall PTR , Upper Saddle River, NJ, USA. Joshua Bloch. 2008. Efective Java (2nd Edition) (The Java Series) (2 ed.). Prentice Hall PTR, Upper Saddle River, NJ, USA.","edition":"2"},{"key":"e_1_2_2_3_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-36946-9"},{"key":"e_1_2_2_4_1","unstructured":"Joe Dufy. 2010. On partially-constructed objects. http:\/\/joedufyblog.com\/ 2010 \/06\/27\/on-partiallyconstructed-objects\/.  Joe Dufy. 2010. On partially-constructed objects. http:\/\/joedufyblog.com\/ 2010 \/06\/27\/on-partiallyconstructed-objects\/."},{"key":"e_1_2_2_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/1882291.1882356"},{"key":"e_1_2_2_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/949305.949332"},{"key":"e_1_2_2_7_1","volume-title":"International Workshop on Aliasing, Confinement and Ownership in object-oriented programming (IWACO).","author":"F\u00e4hndrich Manuel","year":"2003","unstructured":"Manuel F\u00e4hndrich and K Rustan M Leino . 2003 . Heap monotonic typestates . In International Workshop on Aliasing, Confinement and Ownership in object-oriented programming (IWACO). Manuel F\u00e4hndrich and K Rustan M Leino. 2003. Heap monotonic typestates. In International Workshop on Aliasing, Confinement and Ownership in object-oriented programming (IWACO)."},{"key":"e_1_2_2_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/1297027.1297052"},{"key":"e_1_2_2_9_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-03013-0_23"},{"key":"e_1_2_2_10_1","unstructured":"James Gosling Bill Joy Guy Steele Gilad Bracha and Alex Buckley. 2015. The Java Language Specification Java SE 8 Edition.  James Gosling Bill Joy Guy Steele Gilad Bracha and Alex Buckley. 2015. The Java Language Specification Java SE 8 Edition."},{"key":"e_1_2_2_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/130943.130947"},{"key":"e_1_2_2_12_1","unstructured":"Fengyun Liu Ondrej Lhot\u00e1k Aggelos Biboudis Paolo G. Giarrusso and Martin Odersky. 2020. Safe Initialization of Objects. ( 2020 ) 141. http:\/\/infoscience.epfl.ch\/record\/279970  Fengyun Liu Ondrej Lhot\u00e1k Aggelos Biboudis Paolo G. Giarrusso and Martin Odersky. 2020. Safe Initialization of Objects. ( 2020 ) 141. http:\/\/infoscience.epfl.ch\/record\/279970"},{"key":"e_1_2_2_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/73560.73564"},{"key":"e_1_2_2_14_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-03811-6"},{"key":"e_1_2_2_15_1","volume-title":"Dotty Compiler: A Next Generation Compiler for Scala. https:\/\/dotty.epfl.ch\/.","author":"Martin Odersky","year":"2013","unstructured":"Martin Odersky et al. 2013 . Dotty Compiler: A Next Generation Compiler for Scala. https:\/\/dotty.epfl.ch\/. Martin Odersky et al. 2013. Dotty Compiler: A Next Generation Compiler for Scala. https:\/\/dotty.epfl.ch\/."},{"key":"e_1_2_2_16_1","volume-title":"Types and programming languages","author":"Pierce Benjamin C.","unstructured":"Benjamin C. Pierce . 2002. Types and programming languages . MIT Press . Benjamin C. Pierce. 2002. Types and programming languages. MIT Press."},{"key":"e_1_2_2_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/1480881.1480890"},{"key":"e_1_2_2_18_1","volume-title":"A right-to-left type system for mutually-recursive value definitions. CoRR abs\/","author":"Reynaud Alban","year":"1811","unstructured":"Alban Reynaud , Gabriel Scherer , and Jeremy Yallop . 2018. A right-to-left type system for mutually-recursive value definitions. CoRR abs\/ 1811 .08134 ( 2018 ). arXiv: 1811.08134 http:\/\/arxiv.org\/abs\/ 1811.08134 Alban Reynaud, Gabriel Scherer, and Jeremy Yallop. 2018. A right-to-left type system for mutually-recursive value definitions. CoRR abs\/ 1811.08134 ( 2018 ). arXiv: 1811.08134 http:\/\/arxiv.org\/abs\/ 1811.08134"},{"key":"e_1_2_2_19_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-39038-8_9"},{"key":"e_1_2_2_20_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.1986.6312929"},{"key":"e_1_2_2_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/2048066.2048142"},{"key":"e_1_2_2_22_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-31057-7_10"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3428243","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3428243","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T22:02:57Z","timestamp":1750197777000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3428243"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2020,11,13]]},"references-count":22,"journal-issue":{"issue":"OOPSLA","published-print":{"date-parts":[[2020,11,13]]}},"alternative-id":["10.1145\/3428243"],"URL":"https:\/\/doi.org\/10.1145\/3428243","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2020,11,13]]},"assertion":[{"value":"2020-11-13","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}