Let's say I have the following types:
abstract ABC
type A <: ABC
a::Float64
end
type B{T <: ABC}
a::T
end
In some cases, I need for type "B" to be incompletely initialized so that I
can define its parameter "a" later. I've found out that you can do
something like this:
type B{T <: ABC}
a::T
call(::Type{B}) = new{ABC}()
end
which then allows this:
julia> myB = B()
B{ABC}(#undef)
My question is, I'm assuming you lose any of the performance gain by using
the parametric type in this case because you are still using the abstract
type "ABC" for the parameter "a" (even if you define it later with a
concrete "A"). Is there a better way to do this?
Thanks!
Chris