Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3282308.3282341acmotherconferencesArticle/Chapter ViewAbstractPublication PageseuroplopConference Proceedingsconference-collections
research-article

Three Patterns of Data Type Composition in Programming Languages

Published: 04 July 2018 Publication History

Abstract

Data type composition is used in programming languages to build complex data types (known as compound types) from simpler ones. Various programming languages of ten 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.

References

[1]
Apple, Inc. 2018. The Swift Programming Language. Apple, Inc. https://docs.swift.org/swift-book/TheSwift:ProgrammingLanguageSwift42.epub
[2]
Ruslan Batdalov. 2016. Is there a need for a programming language adapted for implementation of design patterns?. In Proceedings of the 21st European Conference on Pattern Languages of Programs (EuroPLoP'16). ACM, 34.
[3]
Ruslan Batdalov and Oksana Nikiforova. 2016. Towards Easier Implementation of Design Patterns. In Proceedings of the Eleventh International Conference on Software Engineering Advances (ICSEA 2016). IARIA, 123--128.
[4]
Ruslan Batdalov, Oksana Nikiforova, and Adrian Giurca. 2016. Extensible Model for Comparison of Expressiveness of Object-Oriented Programming Languages. Applied Computer Systems 20, 1 (2016), 27--35.
[5]
Frank Buschmann, Regine Meunier, Hans Rohnert, Peter Sommerlad, and Michael Stal. 2013. Pattern-Oriented Software Architecture, A System of Patterns. Wiley.
[6]
ECMA-262 2018. ECMAScript® 2018 Language Specification (ninth ed.). Standard. Ecma International.
[7]
ECMA-334 2017. C# Language Specification (fifth ed.). Standard. Ecma International.
[8]
École Polytechnique Fédérale de Lausanne 2018. Scala Standard Library. École Polytechnique Fédérale de Lausanne. http://www.scala-lang.org/api/2.12.7/
[9]
Martin Fowler. 2005. Inversion of control. (June 2005). https://www.martinfowler.com/bliki/InversionOfControl.html
[10]
Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. 1995. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Publishing Company.
[11]
James Gosling, Bill Joy, Guy Steele, Gilad Bracha, Alex Buckley, and Daniel Smith. 2018. The Java Language Specification. Java SE 11 Edition.
[12]
Philipp Haller, Aleksandar Prokopec, Heather Miller, Viktor Klang, Roland Kuhn, and Vojin Jovanovic. 2013. Scala Futures and Promises. http://docs.scala-lang.org/overviews/core/futures.html
[13]
Kevlin Henney. 2002. Null object. In Proceedings of the Seventh European Conference on Pattern Languages of Programming, EuroPLoP.
[14]
Tony Hoare. 2009. Null References: The Billion Dollar Mistake. (August 2009). https://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare
[15]
ISO/IEC 14882:2017 2017. Information technology --- Programming languages --- C++. Standard. ISO/IEC.
[16]
ISO/IEC 9075-2:2016 2016. Information technology --- Database languages --- SQL --- Part 2: Foundation (SQL/Foundation). Standard. ISO/IEC.
[17]
JetBrains 2017. Kotlin Language Documentation. JetBrains. https://kotlinlang.org/docs/kotlin-docs.pdf
[18]
Oleg Kiselyov. 2012. Iteratees. Functional and Logic Programming (2012), 166--181.
[19]
Robert C. Martin. 2008. Clean Code: A Handbook of Agile Software Craftsmanship. Pearson Education.
[20]
Microsoft Corporation 2018. TypeScript Documentation. Microsoft Corporation. http://www.typescriptlang.org/docs/home.html
[21]
Martin Odersky, Philippe Altherr, Vincent Cremet, Gilles Dubochet, Burak Emir, Philipp Haller, Stéphane Micheloud, Nikolay Mihaylov, Adriaan Moors, Lukas Rytz, Michel Schinz, Erik Stenman, and Matthias Zenger. 2016. Scala Language Specification. http://scala-lang.org/files/archive/spec/2.12/
[22]
Martin Odersky and Lex Spoon. 2010. Scala Collections. http://docs.scala-lang.org/overviews/collections/introduction.html
[23]
Perl 5 Porters 2017. Language Reference: Perl 5 version 26.1 documentation. Perl 5 Porters. http://perldoc.perl.org/5.26.1/index.html
[24]
Benjamin C. Pierce. 2002. Types and Programming Languages. MIT Press.
[25]
Python Software Foundation 2018. The Python Language Reference. Python Software Foundation.
[26]
ReactiveX 2018. ReactiveX. http://reactivex.io/intro.html
[27]
Philip Wadler. 1992. Comprehending Monads. In Mathematical Structures in Computer Science. 61--78.
[28]
Philip Wadler. 1992. The essence of functional programming. In Proceedings of the 19th ACM SIGPLAN-SIGACT symposium on Principles of programming languages. ACM, 1--14.

Cited By

View all

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Other conferences
EuroPLoP '18: Proceedings of the 23rd European Conference on Pattern Languages of Programs
July 2018
322 pages
ISBN:9781450363877
DOI:10.1145/3282308
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

In-Cooperation

  • Hillside Europe: Hillside Europe

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 04 July 2018

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Compound types
  2. design patterns

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

EuroPLoP '18

Acceptance Rates

EuroPLoP '18 Paper Acceptance Rate 35 of 53 submissions, 66%;
Overall Acceptance Rate 216 of 354 submissions, 61%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 75
    Total Downloads
  • Downloads (Last 12 months)7
  • Downloads (Last 6 weeks)1
Reflects downloads up to 18 Nov 2024

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media