function overload on full signature?
Walter Bright
newshound2 at digitalmars.com
Wed Nov 14 01:15:48 PST 2012
On 11/13/2012 1:34 PM, Rob T wrote:
> I'm wondering why overloading has been implemented to only match on the argument
> list rather than the full signature which includes the return type? I know I
> would use it if it was available.
>
> I'm not requesting this to be a feature of D, I'm only asking why it is not
> being done.
Because types are resolved bottom-up, and if the return type were part of the
overloading, there would be no sensible rule to determine the types.
More information about the Digitalmars-d
mailing list