Dart generics variance


Topic | v1 | created by jjones |
Description

Covariant generics fit a common intuition that programmers have, and very often this intuition is correct, such as in the common “read-only” use of a generic. Although this intuition isn’t always correct, Dart is erring on the side of convenience by having covariant generics.


Relations

subtopic of Dart

Dart is a client-optimized programming language for apps on multiple platforms. It is developed by Go...

is Covariance and contravariance

Many programming language type systems support subtyping. For instance, if the type Cat is a subtype...


Edit details Edit relations Attach new author Attach new topic Attach new resource
Resources

treated in Dart declaration-site variance

A deep dive into an experimental feature