<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Java only has invariance at the generic type definition level. They allow you to use wildcards as another option to generic constraints for instance references. In effect, variance is faked by the user of a type, not defined by the author of the type.<div class=""><br class=""></div><div class="">The dynamic and unreified nature of java generics is such that several valid systems I have encountered are impossible to properly express. Likewise, several systems I have tried to debug using generics have been found to have unsound generic type systems due to the language not enforcing proper static typing.</div><div class=""><br class=""></div><div class="">IMHO Java is not a good language to use as an example when trying to make a case for changing the behavior of generics.</div><div class=""><br class=""></div><div class="">-DW</div><div class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 12, 2016, at 6:47 PM, Howard Lovatt via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Yes you can annotate for covariance, invariance, and contravariance, both Java and Scala, allow all three. The problem is that the code becomes splattered with variance annotations. The Java people themselves have publicly regretted this and wished that they had made covariance the default. If you look at generic code invariance and covariance are by far the most common requirements; this proposal would address these common use case without burdening the programmer.</div></div></blockquote></div><br class=""></div></div></body></html>