On Monday, 20 April 2015 at 20:22:40 UTC, Jonathan M Davis wrote:
There may be languages out there which take the the return type into account
when overloading, but I've never seen one.

Rust does, as far as I know.

I don't think that the ambiguities are an insurmountable obstacle. It's probably sufficient to error out when a call is ambiguous in its context, as can already happen during overloading.

Also note that, as Ali pointed out, with multiple alias this we will be able to implement this indirectly. Which means that the compiler needs to deal with exactly the same ambiguities anyway. Might as well just take the return type into consideration directly.

Reply via email to