On Friday, 1 July 2022 at 19:03:25 UTC, Paul Backus wrote:
>struct A {}
struct B {}
void f(A) {}
void f(B) {}
f({}); // ambiguous
Why is this more problematic than e.g.:
void f(int[])
{
}
void f(byte[])
{
}
void main()
{
f([]); // Nice ambiguity error
}
?
>void g(A) {}
void g(int) {}
g({}); // not ambiguous, but potentially confusing
void h(A, B) {}
h({}, {}); // not ambiguous, but potentially confusing
Same:
void h(A[], B[]);
h([], []);