Completing the Functional Approach in Object-Oriented Languages

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autor principal: Pluemicke, Martin
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866910726795296768
author Pluemicke, Martin
author_facet Pluemicke, Martin
contents Over the last two decades practically all object-oriented programming languages have introduced features that are well-known from functional programming languages. But many features that were introduced were fragmentary. In Java-TX we address the latter features and propose a completion. Java-TX (i.e. Type eXtended) is a language based on Java. The predominant new features are global type inference and real function types for lambda expressions. Global type inference means that all type annotations can be omitted, and the compiler infers them without losing the static type property. We introduce the function types in a similar fashion as in Scala but additionally integrated them into the Java target-typing as proposed in the so-called strawman approach. In this paper, we provide an integrated presentation of all Java-TX features. The focus is therby on the automatic inference of type parameters for classes and their methods, and on the heterogeneous translation of function types, which permits the preservation of the argument and return types in bytecode.
format Preprint
id arxiv_https___arxiv_org_abs_2412_03126
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Completing the Functional Approach in Object-Oriented Languages
Pluemicke, Martin
Programming Languages
D.1.1; D.1.5; D.3.2
Over the last two decades practically all object-oriented programming languages have introduced features that are well-known from functional programming languages. But many features that were introduced were fragmentary. In Java-TX we address the latter features and propose a completion. Java-TX (i.e. Type eXtended) is a language based on Java. The predominant new features are global type inference and real function types for lambda expressions. Global type inference means that all type annotations can be omitted, and the compiler infers them without losing the static type property. We introduce the function types in a similar fashion as in Scala but additionally integrated them into the Java target-typing as proposed in the so-called strawman approach. In this paper, we provide an integrated presentation of all Java-TX features. The focus is therby on the automatic inference of type parameters for classes and their methods, and on the heterogeneous translation of function types, which permits the preservation of the argument and return types in bytecode.
title Completing the Functional Approach in Object-Oriented Languages
topic Programming Languages
D.1.1; D.1.5; D.3.2
url https://arxiv.org/abs/2412.03126