Parametric Type Constructor


#1

Hi Everyone,

Think of a parametric constructor like this

    type Node{T}<:Tree{T}
        value::T
        parent::Tree{T}
        children::Vector{Tree{T}}
    end

And I want to do this :
Node(12) just initializing value, and leave the remaining fields uninitialized.
What sort of a constructor should i define? Where should i define it? What should be the signature?

Thanks


#2

Have you read
https://docs.julialang.org/en/stable/manual/constructors/#Incomplete-Initialization-1