Skip to content

Commit

Permalink
Merge pull request JuliaLang#9033 from StephenVavasis/patch-13
Browse files Browse the repository at this point in the history
parametric typealias additional explanation
  • Loading branch information
StefanKarpinski committed Nov 27, 2014
2 parents ee6d56f + 12062b5 commit 40fc56b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/manual/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,17 @@ especially helpful, but in Julia, this allows one to write just
``Matrix`` for the abstract type including all two-dimensional dense
arrays of any element type.

This declaration of ``Vector`` creates a subtype relation
``Vector{Int} <: Vector``. However, it is not always the case that a parametric
``typealias`` statement creates such a relation; for example, the statement::

typealias AA{T} Array{Array{T,1},1}
does not create the relation ``AA{Int} <: AA``. The reason is that ``Array{Array{T,1},1}`` is not
an abstract type at all; in fact, it is a concrete type describing a
1-dimensional array in which each entry
is an object of type ``Array{T,1}`` for some value of ``T``.

Operations on Types
-------------------

Expand Down

0 comments on commit 40fc56b

Please sign in to comment.