On Tue, 24 Jul 2012 15:42:19 +0100, Stuart <stu...@gmx.com> wrote:

On Monday, 23 July 2012 at 21:14:31 UTC, Simen Kjaeraas wrote:
On Mon, 23 Jul 2012 22:51:19 +0200, Stuart <stu...@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();

Sadly the comma operator (inherited from C/C++) blocks this syntax.

R

--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply via email to