Affiliation:
1. Microsoft Research, Redmond, WA
Abstract
Mainstream object-oriented languages such as C# and Java provide an initialization model for objects that does not guarantee programmer controlled initialization of fields. Instead, all fields are initialized to default values (0 for scalars and
null
for non-scalars) on allocation. This is in stark contrast to functional languages, where all parts of an allocation are initialized to programmer-provided values. These choices have a direct impact on two main issues: 1) the prevalence of
null
in object oriented languages (and its general absence in functional languages), and 2) the ability to initialize circular data structures. This paper explores connections between these differing approaches and proposes a fresh look at initialization. Delayed types are introduced to express and formalize prevalent initialization patterns in object-oriented languages.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
9 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Verifying object construction;Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering;2020-06-27
2. The Impact of Object Immutability on the Java Class Size;Procedia Computer Science;2020
3. Immutability;Lecture Notes in Computer Science;2013
4. Profiling Field Initialisation in Java;Runtime Verification;2013
5. The Billion-Dollar Fix;ECOOP 2013 – Object-Oriented Programming;2013