Three Patterns of Data Type Composition in Programming Languages

R. Batdalov, O. Ņikiforova
{"title":"Three Patterns of Data Type Composition in Programming Languages","authors":"R. Batdalov, O. Ņikiforova","doi":"10.1145/3282308.3282341","DOIUrl":null,"url":null,"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.","PeriodicalId":136534,"journal":{"name":"Proceedings of the 23rd European Conference on Pattern Languages of Programs","volume":"30 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-07-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 23rd European Conference on Pattern Languages of Programs","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3282308.3282341","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

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.
编程语言中数据类型组成的三种模式
数据类型组合在编程语言中用于从简单的数据类型构建复杂的数据类型(称为复合类型)。各种编程语言通常使用通用的方法来实现类型组合,但是它们的具体实现和提供的机会可能因语言而异。本文使用模式方法描述了数据类型组合中三个反复出现的主题:遍历一组值(可遍历一次模式)、提供一个槽来赋值(可赋一次模式)和不必包含值的变量(可选值模式)。这些模式是在各种编程语言中用于构建复合数据类型的许多构造的一般情况。编程语言、库和框架的设计者可以使用所描述的模式直接在语言中支持相应的数据类型组合机制,或者在更高的级别上替换它们。语言、库和框架的用户可以使用模式的描述来理解底层机制和相关的好处和缺点。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信