Cool thing about D, number #72
Lutger
lutger.blijdestijn at gmail.com
Sat Apr 28 07:46:13 PDT 2007
Luís Marques wrote:
> Bill Baxter wrote:
>> I just realized today the coolness of tupleof for this kind of
>> situation. You can make the function takes the plain floats
>>
>> do_something_at_point(float x, float y, float z);
>>
>> And still call it using a Vec3f via tupleof!
>>
>> Vec3f world_origin;
>> ...
>> do_something_at_point(world_origin.tupleof);
>
> I finally realize how useful tuples are!
> Great contribution.
>
> --
> Luís
Me too, thanks Bill. These are the 'little' things where D shines and
make it so enjoyable to program in.
More information about the Digitalmars-d
mailing list