On Tuesday, April 29, 2014 4:41:52 PM UTC+1, Patrick O'Leary wrote: > > It might be easier to understand if we start by stripping away the > constraints and the function syntax and look just at the array type. > > Array{Real} is a concrete type. It's an array whose elements are all > subtypes of the abstract type Real. > > Array{T} is a family of types. It describes a whole bunch of types, > including Array{Real}, but also including Array{Float64}, Array{All} and > Array{Bob}. T can itself be either abstract--a heterogenous array--or > concrete. > > The constrained type variable {T<:Real}(::Array{T}) still describes a > family of types, but that family is smaller. Array{All} and Array{Bob} are > out. > > Hope this helps! >
Thank you, Patrick. We have now covered how types for arrays currently do work (which I mostly understood), and corrected my mistake in point 3 of my original post. We haven't yet started to address the real point of my post yet, though. I'd be interested to hear more on that.