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

面向对象语言是否错失了关于 Function 类及其子类的良机?

Have Object-Oriented Languages Missed a Trick with Class Function and its Subclasses?

Lloyd Allison

AI总结:

本文指出面向对象语言缺乏面向对象意义上的 class Function 及其子类,通过在流行编程语言中实现此类子类进行实验性研究,探讨面向对象语言错失的这一机会。

摘要:

与数学中的函数相比,编程语言中的函数似乎分类不足。基于 lambda 演算的函数式编程语言著名地将函数视为一等值。面向对象语言已采纳“lambda”,显著用于基于事件编程中的回调例程。通常,编程语言拥有函数,函数具有类型,一些函数作用于其他函数和/或返回函数,但普遍缺乏(i)面向对象意义上的“class Function”,特别是(ii)针对具有特定属性函数的 Function 子类。本文展示了一些此类类,并在一些流行编程语言中进行了编程,作为对面向对象语言错失此机会的实验性研究。

英文摘要:

Compared to functions in mathematics, functions in programming languages seem to be under classified. Functional programming languages based on the lambda calculus famously treat functions as first-class values. Object-oriented languages have adopted ``lambdas'', notably for call-back routines in event-based programming. Typically a programming language has functions, a function has a type, and some functions act on other functions and/or return functions but there is generally a lack of (i) ``class Function'' in the OO sense of the word class and particularly (ii) subclasses of Function for functions having specific properties. Some such classes are presented here and programmed in some popular programming languages as an experimental investigation into OO languages missing this opportunity.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑