On Wed, Feb 10, 2016 at 2:48 PM, Josh Langsfeld <[email protected]> wrote:
> Ok, but how does one actually create a new type object given a new set of
> parameters?

julia> T = Vector{Float64}
Array{Float64,1}

julia> T.name.primary{T.parameters[1],T.parameters[2] + 1}
Array{Float64,2}


>
> On Wednesday, February 10, 2016 at 2:20:27 PM UTC-5, Yichao Yu wrote:
>>
>> On Wed, Feb 10, 2016 at 2:13 PM, Josh Langsfeld <[email protected]> wrote:
>> > Yeah, it does seem ill-posed in general. Still, it would nice if I could
>> > do
>> > this for at least some subtypes that use the same type parameter
>> > pattern,
>> > even if the behavior was undefined when it doesn't use the same pattern.
>> >
>> > Is there any method of dynamically computing a new type by changing one
>> > of
>> > the parameters of a type known only at runtime?
>> >
>> > On Wednesday, February 10, 2016 at 1:04:14 PM UTC-5, Lutfullah Tomak
>> > wrote:
>> >>
>> >> For AbstractArray, a caveat is the actual type may have more parameters
>> >> and cannot be sure about parameters' order.
>>
>> You can always get the parameters (.parameters field) and construct a new
>> type.

Reply via email to