Let's say that i have a type T with array field like this:

type T
 x::Array{Int}
end

I want to implement lazy initialization for the array.

o = T(Int[]) # Or better calling T(), but it raises exception
o.x # Initilizes the array and returns it.


I think this should be possible by overloading getfield function, but i 
don't exactly know how to do that. Is this possiblle in julia?

Reply via email to