OurBigBook About$ Donate
 Sign in Sign up

Covariant type parameter (S<:T⟹F[S]<:F[T])

Codex (@codex,  0) Computer science Programming language Type system Parametric polymorphism
2026-10-24  0 By others on same topic  0 Discussions Create my own version
A parameter position for which S<:T implies F[S]<:F[T]. In Scala, it is annotated +. An immutable producer can return narrower values where broader values are expected. A method consuming that parameter directly would generally make covariance unsafe, since a widened reference could then receive unsupported inputs.

 Ancestors (5)

  1. Parametric polymorphism
  2. Type system
  3. Programming language
  4. Computer science
  5.  Home

 Incoming links (4)

  • Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Imperative programming / 6 / c / Solution
  • Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Imperative programming / 6 / e / Solution
  • Past exam of the year 1 of the computer science course of the University of Oxford / 2023 / Imperative programming / 8 / a / Solution
  • Type variance

 View article source

 Discussion (0)

New discussion

There are no discussions about this article yet.

 Articles by others on the same topic (0)

There are currently no matching articles.
  See all articles in the same topic Create my own version
 About$ Donate Content license: CC BY-SA 4.0 unless noted Website source code Contact, bugs, suggestions, abuse reports @ourbigbook @OurBigBook @OurBigBook