首页    期刊浏览 2025年07月17日 星期四
登录注册

文章基本信息

  • 标题:λ-Based Object-Oriented Programming (Pearl)
  • 本地全文:下载
  • 作者:Servetto, Marco ; Zucca, Elena
  • 期刊名称:LIPIcs : Leibniz International Proceedings in Informatics
  • 电子版ISSN:1868-8969
  • 出版年度:2021
  • 卷号:194
  • DOI:10.4230/LIPIcs.ECOOP.2021.21
  • 语种:English
  • 出版社:Schloss Dagstuhl -- Leibniz-Zentrum fuer Informatik
  • 摘要:We show that a minimal subset of Java 8 excluding classes supports a simple and natural programming style, which we call λ-based object-oriented programming. That is, on one hand the programmer can use tuples in place of objects (class instances), and tuples can be desugared to lambdas following their classical encoding in the λ-calculus. On the other hand, lambdas can be equipped with additional behaviour, thanks to the fact that they may implement interfaces with default methods, hence inheritance and dynamic dispatch are still supported. We formally describe the encoding by a translation from FJλ, an FJ variant including lambdas and interfaces with default methods, to FJλ-, a subset of FJλ with no classes (hence no constructors and fields). We provide several examples illustrating this novel programming style.
  • 关键词:Programming paradigms;Java;lambda-calculus
国家哲学社会科学文献中心版权所有