Is there a difference between these two functions? Is it just a coincidence/fluke of Julia syntax, or is there a deeper meaning that separates them or reason for both of them to be permitted.
function f(a::AbstractVector{Int})
a.*2
end
function g(a::T) where T<:AbstractVector{Int}
a.*2
end
To me the first one reads “f takes arguments of type exactly AbstractVector{Int}”, while the second one reads “g takes arguments that are subtypes of AbstractVector{Int}”. Am I reading this wrong?