Named return type > Out parameters

Nick Sabalausky a at a.a
Thu Nov 12 20:17:22 PST 2009


"Leandro Lucarella" <llucax at gmail.com> wrote in message 
news:20091113031715.GD8560 at llucax.com.ar...
> Nick Sabalausky, el 12 de noviembre a las 22:13 me escribiste:
>> "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?)
>
> GoogleGo doesn't have function overloading at all.
>

Heh, you know, normally I would never think to question whether or not a 
language had function overloading ("Well hell, why don't I just ask if it 
has multiplication? That wouldn't be a dumb question at all!"), but 
something about GoogleGo (as I've decided I'm going to keep calling it) made 
me think "Umm...you may not want to assume that in this case...".





More information about the Digitalmars-d mailing list