arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

使用省略号编程

Programming with Ellipses

Martin Erwig, Hangil Kim

arXiv 2607.10001首次发表:更新:

AI 中文总结

研究提出一种语言扩展设计,允许在模式和表达式中用省略号,通过程序转换定义其语义。此设计便于列表函数定义,适用范围广,能支持函数式编程教学,为函数式语言增添语法多样性与表现力。

AI 中文摘要

我们提出了一种语言扩展设计,允许在模式和表达式中使用省略号(“...”)。这便于对列表进行函数定义,比标准递归定义更简洁直接。省略号表示法的语义通过程序转换定义,基于计算省略号边界表达式的最小一般化。我们表明省略号表示法适用于广泛的函数定义,还能支持函数式编程教学,对有命令式编程背景的人尤其有帮助,为函数式语言增添了语法多样性和表现力。

英文摘要

We present the design of a language extension that allows the use of ellipses ("...") in patterns and expressions, which facilitates function definitions on lists that are more succinct and direct than the standard recursive ones. The semantics of ellipsis notation is defined via a program translation that is based on computing least general generalizations of the expressions on the boundary of ellipses. We show that ellipsis notation applies to a wide spectrum of function definitions. Ellipsis notation can also support the teaching of functional programming, and its inherently iterative nature may make it especially helpful to those with an imperative programming background. Like list comprehensions, ellipsis notation provides an attractive tool for functional languages that adds to their syntactic variety and enriches their expressiveness.

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑