Is dispatch on another type's parameter (::NotMyType{MyType}) piracy?

I think it does (but I’m no authority). When you implement a new type SomeType{T} and define functions to manipulate it, you need to know that these functions do what you wrote, also internally, not just at the surface exposed to the user.

Consider this example:

mutable struct S{T}
    x::T
    y::T
    a::Union{Missing,T}  # value to be cached
    S(x::T,y::T) where T = new{T}(x, y, missing)
end

function get_a(s::S)
    if ismissing(s.a)
        s.a = expensive_function(s.x, s.y)
    end
    return s.a
end

function get_b(s::S)
    get_a(s)  # Make sure `a` is cached
    return s.a * s.a;
end

I don’t want to document that get_b is going to call get_a to populate the cached value of a. This is all internal stuff, but I should be able to depend on it when I implement my own functions on my own types. Also in the case of parametric types. So it makes sense to me that users are not allowed to define get_a(s::S{CustomType}) even if they own CustomType.

Of course it’s fine if I document that it’s allowed (as in the convert case).