Covariance and contravariance (computer science): Difference between revisions

Content deleted Content added
Undid revision 1191354127 by DuncanSungWKim (talk). Cf. verbiage at Function (mathematics).
I was deleting Scala from the table "The following table summarizes the rules for overriding methods in the languages discussed above." As far as I know, Scala non-generic (concrete) parameters have no contravariance, and no covariance either (except return type). Scala supports contravariance (and covariance) with generic parameters (in generic classes and generic methods) and with abstract types (for example: type T <: A).
Line 312:
| [[C Sharp (programming language)|C#]] (before C# 9) || Invariant || Invariant
|-
| [[Scala (programming language)|Scala]], [[Sather]] || Contravariant || Covariant
|-
| [[Eiffel (programming language)|Eiffel]] || Covariant || Covariant