Java wildcards meet definition-site variance
(2012) 26th European Conference on Object-Oriented Programming, ECOOP 2012 In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) 7313 LNCS. p.509-534- Abstract
Variance is concerned with the interplay of parametric polymorphism (i.e., templates, generics) and subtyping. The study of variance gives answers to the question of when an instantiation of a generic class can be a subtype of another. In this work, we combine the mechanisms of use-site variance (as in Java) and definition-site variance (as in Scala and C#) in a single type system, based on Java. This allows maximum flexibility in both the specification and use of generic types, thus increasing the reusability of code. Our VarJ calculus achieves a safe synergy of def-site and use-site variance, while supporting the full complexities of the Java realization of variance, including F-bounded polymorphism and wildcard capture. We show that... (More)
Variance is concerned with the interplay of parametric polymorphism (i.e., templates, generics) and subtyping. The study of variance gives answers to the question of when an instantiation of a generic class can be a subtype of another. In this work, we combine the mechanisms of use-site variance (as in Java) and definition-site variance (as in Scala and C#) in a single type system, based on Java. This allows maximum flexibility in both the specification and use of generic types, thus increasing the reusability of code. Our VarJ calculus achieves a safe synergy of def-site and use-site variance, while supporting the full complexities of the Java realization of variance, including F-bounded polymorphism and wildcard capture. We show that the interaction of these features with definition-site variance is non-trivial and offer a full proof of soundness - the first in the literature for an approach combining variance mechanisms.
(Less)
- author
- Altidor, John ; Reichenbach, Christoph LU and Smaragdakis, Yannis
- publishing date
- 2012-12-01
- type
- Chapter in Book/Report/Conference proceeding
- publication status
- published
- subject
- keywords
- Type System, Variance Annotation, Type Check, Method Invocation
- host publication
- ECOOP 2012 - Object-Oriented Programming : 26th European Conference, Proceedings - 26th European Conference, Proceedings
- series title
- Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
- volume
- 7313 LNCS
- pages
- 26 pages
- conference name
- 26th European Conference on Object-Oriented Programming, ECOOP 2012
- conference location
- Beijing, China
- conference dates
- 2012-06-11 - 2012-06-16
- external identifiers
-
- scopus:84879735450
- ISSN
- 0302-9743
- 1611-3349
- ISBN
- 9783642310560
- DOI
- 10.1007/978-3-642-31057-7_23
- language
- English
- LU publication?
- no
- id
- 8c12b55d-5fe4-4db2-be83-85eabb8b8b2b
- date added to LUP
- 2019-03-29 20:18:34
- date last changed
- 2025-01-09 05:07:06
@inproceedings{8c12b55d-5fe4-4db2-be83-85eabb8b8b2b, abstract = {{<p>Variance is concerned with the interplay of parametric polymorphism (i.e., templates, generics) and subtyping. The study of variance gives answers to the question of when an instantiation of a generic class can be a subtype of another. In this work, we combine the mechanisms of use-site variance (as in Java) and definition-site variance (as in Scala and C#) in a single type system, based on Java. This allows maximum flexibility in both the specification and use of generic types, thus increasing the reusability of code. Our VarJ calculus achieves a safe synergy of def-site and use-site variance, while supporting the full complexities of the Java realization of variance, including F-bounded polymorphism and wildcard capture. We show that the interaction of these features with definition-site variance is non-trivial and offer a full proof of soundness - the first in the literature for an approach combining variance mechanisms.</p>}}, author = {{Altidor, John and Reichenbach, Christoph and Smaragdakis, Yannis}}, booktitle = {{ECOOP 2012 - Object-Oriented Programming : 26th European Conference, Proceedings}}, isbn = {{9783642310560}}, issn = {{0302-9743}}, keywords = {{Type System; Variance Annotation; Type Check; Method Invocation}}, language = {{eng}}, month = {{12}}, pages = {{509--534}}, series = {{Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)}}, title = {{Java wildcards meet definition-site variance}}, url = {{http://dx.doi.org/10.1007/978-3-642-31057-7_23}}, doi = {{10.1007/978-3-642-31057-7_23}}, volume = {{7313 LNCS}}, year = {{2012}}, }