Hi all,
Is there anyway to do something like the following?
abstract ABC
type A <: ABC end
type B <: ABC end
type TestType{T <:ABC}
a::Float64
b::T
TestType(a::Float64) = new(a)
end
myT = TestType(4.0)
myT.b = A()
I am wondering if you can incompletely initialize a parametric type, and
then set the actual value needed later. The above code doesn't work, but
that is what I'm trying to do. The alternative is I guess to have some
default Null Type, but then to get the performance gains I have to copy the
object when I want to actually set it with the value that I want.
Thanks!
Chris