Skip to content

Commit

Permalink
add wikipedia link to co/contravariant types
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj authored Feb 2, 2017
1 parent b1ef60e commit 272ca05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/src/manual/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ false
This last point is *very* important: even though `Float64 <: Real` we **DO NOT** have `Point{Float64} <: Point{Real}`.

In other words, in the parlance of type theory, Julia's type parameters are *invariant*, rather
than being covariant (or even contravariant). This is for practical reasons: while any instance
than being [covariant (or even contravariant)](https://en.wikipedia.org/wiki/Covariance_and_contravariance_%28computer_science%29). This is for practical reasons: while any instance
of `Point{Float64}` may conceptually be like an instance of `Point{Real}` as well, the two types
have different representations in memory:

Expand Down

0 comments on commit 272ca05

Please sign in to comment.