Hello!
I know that it is a very “internals” thing, but svec
is not documented anywhere in the docs. Also, this is rather unhelpful:
help?> Core.svec
No documentation found.
Core.svec is a Function.
# built-in function; no methods
julia>
Is there any reason for this?
Yep, I could more or less know what it is.
I meant that it is not documented anywhere in the docs, and it does show up commonly when working with types and inference. For example:
julia> struct multi_param{T, U}
q::Float64
r::T
s::U
end
julia> obj2 = multi_param(8.0,9,10)
multi_param{Int64, Int64}(8.0, 9, 10)
julia> typeof(obj2).parameters
svec(Int64, Int64)
I think this should be documented, don’t you think?
.parameters
is considered as a part of internal implementation, so it is potentially subject to change. Probably this is why it is not documented (too much trouble to keep it up to date and those who use it, know it’s behaviour anyway).
2 Likes