Multiple return values...

Jose Armando Garcia jsancio at gmail.com
Tue Mar 13 12:07:11 PDT 2012


On Tue, Mar 13, 2012 at 9:07 AM, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> On 3/13/12 10:48 AM, Manu wrote:
>>
>> float t;
>> ...
>> (myStruct.pos, t, _, int err) = intersectThings();
>

This can be checked at compile time. The D compiler can check that the
number of arguments and the types match.

>
> I actually find the scatter syntax better than this. Anyway, I hope you'll
> agree there's not much difference pragmatically.
>

Correct if I am wrong but the scatter and gather functions cannot
check that the number of arguments and their type match at compile
time.

> Andrei
>
>


More information about the Digitalmars-d mailing list