Just where has this language gone wrong?
Stuart
stugol at gmx.com
Tue Jul 24 07:42:19 PDT 2012
On Monday, 23 July 2012 at 21:14:31 UTC, Simen Kjaeraas wrote:
> On Mon, 23 Jul 2012 22:51:19 +0200, Stuart <stugol at gmx.com>
> wrote:
>
>> Saves us having to create a struct for every goddamn little
>> function; or using tuples directly, which means we have to
>> refer to variables like .value1 and .value2 instead of
>> something meaningful.
>
> You mean like this?
>
> Tuple!(float, "x", float, "y") bar() {
> return typeof(return)( 0.0, 0.0 );
> }
>
> auto xCoord = bar().x;
You mean it's already supported? Nice! Although, It'd still be
awesome to be able to do things like:
auto a,b = bar();
auto c,_ = bar();
More information about the Digitalmars-d
mailing list