TY - CHAP
T1 - Intersection Types in Java
T2 - Back to the Future
AU - Dezani-Ciancaglini, Mariangiola
AU - Giannini, Paola
AU - Venneri, Betti
N1 - Publisher Copyright:
© 2019, Springer Nature Switzerland AG.
PY - 2019
Y1 - 2019
N2 - In this paper we figure out the future of intersection types in Java developments, based both on the primary meaning of the intersection type constructor and on the present approach in Java. In our vision, the current use of intersection types will be extended in two directions. Firstly, intersections will be allowed to appear as types of fields, types of formal parameters and return values of methods, therefore they will be significantly used as target types for expressions anywhere. Secondly, the notion of functional interface will be extended to any intersection of interfaces, including also several abstract methods with different signatures. Thus a single target type will be able to express multiple, possibly unrelated, properties of one expression. We formalise our proposal through a minimal Java core extended with these novel features and we prove the type safety property.
AB - In this paper we figure out the future of intersection types in Java developments, based both on the primary meaning of the intersection type constructor and on the present approach in Java. In our vision, the current use of intersection types will be extended in two directions. Firstly, intersections will be allowed to appear as types of fields, types of formal parameters and return values of methods, therefore they will be significantly used as target types for expressions anywhere. Secondly, the notion of functional interface will be extended to any intersection of interfaces, including also several abstract methods with different signatures. Thus a single target type will be able to express multiple, possibly unrelated, properties of one expression. We formalise our proposal through a minimal Java core extended with these novel features and we prove the type safety property.
UR - https://www.scopus.com/pages/publications/85068006672
U2 - 10.1007/978-3-030-22348-9_6
DO - 10.1007/978-3-030-22348-9_6
M3 - Chapter
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 68
EP - 86
BT - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
PB - Springer Verlag
ER -