Please read the following section of the manual
http://julia.readthedocs.org/en/latest/manual/types/#man-parametric-types.
You can also try to search the julia list for the words that John mentions.
I think that Stefan Karpinski gave a detailed explanation at some point.

2014-11-29 15:38 GMT-05:00 Petr Krysl <[email protected]>:

> Newbie-type question:
>
> This is true:
> Float64 <: FloatingPoint
>
> This is false:
> Array{Float64} <: Array{FloatingPoint}
>
> Why?  I'm perhaps not referring here to the actual code to explain why.
> Rather why should this be so?
>
> Let us say I wanted to write a function
>
> function f(a::Array{FloatingPoint})
>   show(a)
> end
>
> And then
>
> #define an array
> A=Float64[1.0 2.0; -3.0 -4.0; 5.0 6.0]
> #this will fail.  Why should it fail?
> f(A)
>
> Petr
>
>

Reply via email to