skip to main content
10.1145/3628034.3628041acmotherconferencesArticle/Chapter ViewAbstractPublication PageseuroplopConference Proceedingsconference-collections
research-article
Open access

The Sequential Initializer Tree Pattern

Published: 05 February 2024 Publication History

Abstract

We present the Sequential Initializer Tree Pattern, a creational design pattern for flexible and safe initialization of complex objects in programming. While the Sequential Initializer Pattern [7] provides only one yet safe way to initialize a complex object, the Sequential Initializer Tree Pattern provides an equally safe but more flexible way to initialize a complex object, yet inherits all the benefits of the original pattern, including readability, writeability, enforced correct usage and reduced cognitive load for the user. We show that applying this pattern is as simple as the original pattern, yet provides a more flexible way to safely initialize objects and therefore prevents cumbersome data transformations at code level.

References

[1]
Andrei Alexandrescu. 2001. Modern C++ Design, Generic Programming and Design Patterns Applied. Pearson Education, London, UK.
[2]
Kellogg S. Booth and George S. Lueker. 1976. Testing for the consecutive ones property, interval graphs, and graph planarity using PQ-tree algorithms. J. Comput. System Sci. 13, 3 (1976), 335–379.
[3]
Frank Buschmann, Kevlin Henney, and Douglas C. Schmidt. 2007. Pattern-Oriented Software Architecture. Wiley, United States.
[4]
Haskell Curry and Robert Feys. 1958. Combinatory logic. Vol. I (2 ed.). North-Holland Publishing Company, Amsterdam, Netherlands.
[5]
Krzysztof Czarnecki and Ulrich Eisenecker. 2007. Generative Programming: Methods, Tools, and Applications. Addison Wesley, United States.
[6]
[6] Dart Docs. 2023. https://dart.dev/language/constructors#named-constructorsNamed Constructors.
[7]
Martin Eisemann. 2022. The Sequential Initializer Pattern. In Proc. European Conference on Pattern Languages of Programs (EuroPLoP). Featured in ACM Showcase / Kudos.
[8]
Martin Fowler and Rebecca Parsons. 2011. Domain-specific Languages. Addison-Wesley.
[9]
Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. 1995. Design Patterns. Elements of Reusable Object-Oriented Software. Addison Wesley, United States.
[10]
Douglas Gregor and Jaakko Järvi. 2008. Variadic Templates for C++0x. Journal of Object Technology (2008), 31––51.
[11]
[11] Tom Misawa. 2019. https://riversun.github.io/java-builder/Java Builder Pattern Generator Online.
[12]
J. Noble. 1998. Classifying relationships between object-oriented design patterns. In Proceedings 1998 Australian Software Engineering Conference (Cat. No.98EX233). 98–107.
[13]
United States Department of Defense. 1983. Reference Manual for the Ada Programming Language. United States Department of Defense, United States.
[14]
Marco Servetto, Julian Mackay, Alex Potanin, and James Noble. 2013. The Billion-Dollar Fix: Safe Modular Circular Initialisation. In Proceedings of the 27th European Conference on Object-Oriented Programming (Montpellier, France) (ECOOP’13). Springer-Verlag, Berlin, Heidelberg, 205–229.
[15]
Bjarne Stroustrup. 1994. The Design and Evolution of C++. Addison Wesley, United States.
[16]
Jeffrey Stylos and Steven Clarke. 2007. Usability Implications of Requiring Parameters in Objects’ Constructors. In Proceedings of the 29th International Conference on Software Engineering(ICSE ’07). IEEE Computer Society, USA, 529–539.
[17]
Valentino Vranić and Aleksandra Vranić. 2019. Drama Patterns: Extracting and Reusing the Essence of Drama. In Proceedings of the 24th European Conference on Pattern Languages of Programs (Irsee, Germany) (EuroPLop ’19). Association for Computing Machinery, New York, NY, USA, Article 4, 9 pages.

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Other conferences
EuroPLoP '23: Proceedings of the 28th European Conference on Pattern Languages of Programs
July 2023
451 pages
ISBN:9798400700408
DOI:10.1145/3628034
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives International 4.0 License.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 05 February 2024

Check for updates

Author Tags

  1. builder pattern
  2. creational design pattern
  3. design pattern
  4. pattern

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

EuroPLoP 2023

Acceptance Rates

Overall Acceptance Rate 216 of 354 submissions, 61%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 134
    Total Downloads
  • Downloads (Last 12 months)134
  • Downloads (Last 6 weeks)20
Reflects downloads up to 10 Nov 2024

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media