TOWARDS PROGRAMMING WITH FIRST-CLASS PATTERNS

L. Hamel, Timothy Colaneri, Ariel Finkle, Oliver McLaughlin
{"title":"TOWARDS PROGRAMMING WITH FIRST-CLASS PATTERNS","authors":"L. Hamel, Timothy Colaneri, Ariel Finkle, Oliver McLaughlin","doi":"10.33965/icwi_ac2021_202109r032","DOIUrl":null,"url":null,"abstract":"Pattern matching is a powerful programming paradigm which first appeared in functional programming languages to make data structure analysis and decomposition more declarative. Promoting patterns to first-class status does not increase the computational power of a programming language, but it does increase its expressiveness allowing for brand new ways of solving problems. First-class patterns were studied in the context of the lambda calculus. Today, almost all modern programming languages incorporate some form of pattern matching. However, with only a few exceptions, all programming languages we are aware of that support pattern matching stop short of treating patterns as first-class citizens. Consequently, many interesting use cases of pattern matching lie beyond the reach of those languages. We have implemented first-class patterns in Asteroid, a dynamically typed, multi-paradigm programming language, in order to assess and experiment with first-class patterns. Here we report some of our initial findings. The idea of first-class patterns is not new but we feel that the insights provided here are novel and highlight the impact that first-class patterns can have on programming languages and the discipline of programming itself .","PeriodicalId":178063,"journal":{"name":"Proceedings of the International Conferences on WWW/Internet 2021 and Applied Computing 2021","volume":"60 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-10-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the International Conferences on WWW/Internet 2021 and Applied Computing 2021","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.33965/icwi_ac2021_202109r032","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Pattern matching is a powerful programming paradigm which first appeared in functional programming languages to make data structure analysis and decomposition more declarative. Promoting patterns to first-class status does not increase the computational power of a programming language, but it does increase its expressiveness allowing for brand new ways of solving problems. First-class patterns were studied in the context of the lambda calculus. Today, almost all modern programming languages incorporate some form of pattern matching. However, with only a few exceptions, all programming languages we are aware of that support pattern matching stop short of treating patterns as first-class citizens. Consequently, many interesting use cases of pattern matching lie beyond the reach of those languages. We have implemented first-class patterns in Asteroid, a dynamically typed, multi-paradigm programming language, in order to assess and experiment with first-class patterns. Here we report some of our initial findings. The idea of first-class patterns is not new but we feel that the insights provided here are novel and highlight the impact that first-class patterns can have on programming languages and the discipline of programming itself .
朝着使用一流模式编程的方向发展
模式匹配是一种功能强大的编程范式,它首次出现在函数式编程语言中,使数据结构分析和分解更具声明性。将模式提升到一流的地位并不能提高编程语言的计算能力,但它确实提高了它的表达能力,允许使用全新的方法来解决问题。在λ演算的背景下研究了一级模式。今天,几乎所有的现代编程语言都包含了某种形式的模式匹配。然而,除了少数例外,我们所知道的所有支持模式匹配的编程语言都没有将模式视为一等公民。因此,许多有趣的模式匹配用例超出了这些语言的范围。我们在Asteroid(一种动态类型的多范式编程语言)中实现了一级模式,以便对一级模式进行评估和实验。这里我们报告一些我们的初步发现。一级模式的概念并不新鲜,但我们觉得这里提供的见解是新颖的,并强调了一级模式对编程语言和编程本身的学科的影响。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信