suppose we have the following classes:
struct A; end
struct B; end
struct C{T}; x; end
function foo(c::C); c.x = 1; end
does invoking foo(C{A}())
and foo(C{B}())
still cause the compiler to generate two specialized functions, one for A and the other for B ? If so, is there any difference in writing foo(c::C)
and foo(c::C{T)) where {T}
, besides the obvious case when T is referred in the body of foo for whatever reason?