Taming the wildcards: combining definition- and use-site variance

John Altidor, S. Huang, Y. Smaragdakis
2011
1 reference

Abstract

Variance allows the safe integration of parametric and subtype polymorphism. Two flavors of variance, definition-site versus use-site variance, have been studied and have had their merits hotly debated. Definition-site variance (as in Scala and C#) offers simple type-instantiation rules, but causes fractured definitions of naturally invariant classes; Use-site variance (as in Java) offers simplicity in class definitions, yet complex type-instantiation rules that elude most programmers.

1 repository
1 reference

Code References

rust-lang/rust
1 file
compiler/rustc_type_ir/src/lib.rs
1
/// Combining Definition- and Use-Site Variance" published in PLDI'11.
Link copied to clipboard!