Add topic "Covariance and contravariance" Accepted
Changes: 11
-
Add Covariance and contravariance
- Title
-
- Unchanged
- Covariance and contravariance
- Description
-
- Unchanged
- Many programming language type systems support subtyping. For instance, if the type Cat is a subtype of Animal, then an expression of type Cat should be substitutable wherever an expression of type Animal is used. Variance refers to how subtyping between more complex types relates to subtyping between their components. For example, how should a list of Cats relate to a list of Animals? Or how should a function that returns Cat relate to a function that returns Animal? Depending on the variance of the type constructor, the subtyping relation of the simple types may be either preserved, reversed, or ignored for the respective complex types. In the OCaml programming language, for example, "list of Cat" is a subtype of "list of Animal" because the list type constructor is covariant. This means that the subtyping relation of the simple types are preserved for the complex types.
- Link
-
- Unchanged
- https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)
Topic | v1 | current (v1) -
Add .NET Covariance and Contravariance
- Title
-
- Unchanged
- .NET Covariance and Contravariance
- Description
-
- Unchanged
- Covariance and contravariance are terms that refer to the ability to use a more derived type (more specific) or a less derived type (less specific) than originally specified. Generic type parameters support covariance and contravariance to provide greater flexibility in assigning and using generic types.
- Link
-
- Unchanged
- https://docs.microsoft.com/en-us/dotnet/standard/generics/covariance-and-contravariance
Topic | v1 | current (v1) -
Add .NET
- Title
-
- Unchanged
- .NET
- Description
-
- Unchanged
- A developer platform for building all your apps: web, mobile, desktop, gaming, IoT, and more. Supported on Windows, Linux, and macOS.
- Link
-
- Unchanged
- https://docs.microsoft.com/en-us/dotnet/
Topic | v1 | current (v1) -
Add Programming language parent of Covariance and contravariance
- Current
- parent of
Topic to topic relation | v1 -
Add ASP.NET subtopic of .NET
- Current
- subtopic of
Topic to topic relation | v1 -
Add .NET Framework subtopic of .NET
- Current
- subtopic of
Topic to topic relation | v1 -
Add .NET Core subtopic of .NET
- Current
- subtopic of
Topic to topic relation | v1 -
Add Dart generics variance is Covariance and contravariance
- Current
- is
Topic to topic relation | v1 -
Add Covariance and contravariance e.g. .NET Covariance and Contravariance
- Current
- e.g.
Topic to topic relation | v1 -
Add .NET Covariance and Contravariance subtopic of .NET
- Current
- subtopic of
Topic to topic relation | v1 -
Add ASP.NET Core subtopic of .NET
- Current
- subtopic of
Topic to topic relation | v1