Named return type > Out parameters

Nick Sabalausky a at a.a
Thu Nov 12 19:13:38 PST 2009


"xx" <xx at xx.com> wrote in message news:hdidi8$213s$1 at digitalmars.com...
> Next in the series of "How about Go's ____":
>
> (int var1, float var2) function();
>
> is much nicer, logical and consistent than:
>
> int function(out float var2);
>
>
> Of course this requires multiple assignment, but that's another cool 
> thing.
>

I have always liked that idea, but the nice thing about "out" params is that 
you can overload on them, and D can't overload on return values (apperently 
there are problems with that). Anyone know if GoogleGo functions can be 
overloaded on return value? (Or if it even does function overloading at all, 
for that matter?) 





More information about the Digitalmars-d mailing list