On Saturday, November 14, 2015 at 10:59:26 AM UTC-5, MA Laforge wrote: > > >> - `immutable KD{Symbol} end` does not force the type parameter to be a >> symbol. It does the same thing as the more typical 'T' (which could be >> :tfund, Int, Array{Symbol,2}, or anything else). >> > Hmm... I have been having trouble with this one. I know I have succeeded > with things like "abstract KD{T<:Number}" - but I don't seem to be able to > do "abstract KD{T<:Symbol}", or "abstract KD{T::Symbol}". I don't > understand why I cannot get this level of control. I would appreciate if > you would have more insight on this part. >
I've also wanted to use the "abstract KD{S::Symbol}" syntax before and it has come up on github once or twice (https://github.com/JuliaLang/julia/issues/9580#issuecomment-101408507). Mostly it doesn't seem to let you do anything that you can't do now (by leaving off the type qualifier) and so it hasn't been prioritized on anyone's list.