julia> abstract Human
julia> immutable Man <: Human
x::ASCIIString
end
julia>
julia> john = Man("John")
Man("John")
julia> function yo(h::Human)
println("yo ", h.x)
end
yo (generic function with 1 method)
julia> yo(john)
yo John
julia> function yo{T <: Human}(h::T)
println("yo yo yo ", h.x)
end
yo (generic function with 2 methods)
julia> yo(john)
yo yo yo John
The two definitions
yo(h::Human)
yo{T <: Human}(h::T)
which one is prefered?
The second definition has higher priority.
Are those two definitions actually the same?