> Additionally it seems confusing that the new() method in in the constructor 
> does not call the zero parameter constructor, e.g. there is not constructor 
> chaining 

You can chain by calling the constructor again:

immutable MT10{R<:Real}
    b::R
    c::R
    a::R
    MT10(b,c,a) = (@assert a<b; new(b,c,a))
    MT10(; b=77, c=7, a=5) = MT10{R}(b,c,a) # note the {R} !
end # line 244:
MT10{R}(b::R,c::R,a::R) = MT10{R}(b,c,a)

then
julia> MT10{Int}(a=1000)
ERROR: assertion failed: a < b
 in MT10 at none:5
 in #s120 at none:6

julia> MT10{Int}(a=10)
MT10{Int64}(77,7,10)

Reply via email to