The billion-dollar fix safe modular circular initialisation with placeholders and placeholder types

22Citations
Citations of this article
3Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Programmers often need to initialise circular structures of objects. Initialisation should be safe (so that programs can never suffer null pointer exceptions or otherwise observe uninitialised values) and modular (so that each part of the circular structure can be written and compiled separately). Unfortunately, existing languages do not support modular circular initialisation: programmers in practical languages resort to Tony Hoare's "Billion Dollar Mistake": initialising variables with nulls, and then hoping to fix them up afterward. While recent research languages have offered some solutions, none fully support safe modular circular initialisation. We present placeholders, a straightforward extension to object-oriented languages that describes circular structures simply, directly, and modularly. In typed languages, placeholders can be described by placeholder types that ensure placeholders are used safely. We define an operational semantics for placeholders, a type system for placeholder types, and prove soundness. Incorporating placeholders into object-oriented languages should make programs simultaneously simpler to write, and easier to write correctly. © 2013 Springer-Verlag Berlin Heidelberg.

Cite

CITATION STYLE

APA

Servetto, M., Mackay, J., Potanin, A., & Noble, J. (2013). The billion-dollar fix safe modular circular initialisation with placeholders and placeholder types. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 7920 LNCS, pp. 205–229). Springer Verlag. https://doi.org/10.1007/978-3-642-39038-8_9

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free