Three Patterns of Data Type Composition in Programming Languages
EuroPLoP '18: Proceedings of the 23rd European Conference on Pattern Languages of Programs 2018
Ruslan Batdalov, Oksana Ņikiforova

Data type composition is used in programming languages to build complex data types (known as compound types) from simpler ones. Various programming languages often use common approaches to type composition, but their particular implementation and provided opportunities may differ between languages. The paper uses the patterns methodology to describe three recurring themes in data type composition: traversing a set of values (the Traversable Once pattern), providing a slot to assign a value (the Assignable Once pattern) and variables that do not have to contain a value (the Optional Value pattern). These patterns are general cases of a number of constructs used for building compound data types in various programming languages. The described patterns may be used by designers of programming languages, libraries and frameworks to support the corresponding data type composition mechanisms directly in the language or their replacement at a higher level. Users of languages, libraries and frameworks may use the description of the patterns to understand underlying mechanisms and related benefits and liabilities.


Keywords
Compound types, design patterns
DOI
10.1145/3282308.3282341
Hyperlink
https://dl.acm.org/authorize?N677708

Batdalov, R., Ņikiforova, O. Three Patterns of Data Type Composition in Programming Languages. In: EuroPLoP '18: Proceedings of the 23rd European Conference on Pattern Languages of Programs, Germany, Irsee, 4-8 July, 2018. New York: ACM, 2018, pp.1-8. ISBN 978-1-4503-6387-7. Available from: doi:10.1145/3282308.3282341

Publication language
English (en)
The Scientific Library of the Riga Technical University.
E-mail: uzzinas@rtu.lv; Phone: +371 28399196