Thread overview
What is @return?
Jan 29, 2015
Jesse Phillips
Jan 29, 2015
ketmar
Jan 29, 2015
Jonathan M Davis
Jan 29, 2015
Jesse Phillips
Jan 29, 2015
FG
Jan 29, 2015
Benjamin Thaut
January 29, 2015
A recent discussion over in digitalmars.D
http://forum.dlang.org/post/rtwbtxigfeupvykpbamh@forum.dlang.org

talks about accepting @return... Here is an example from the PR:
https://github.com/D-Programming-Language/dmd/compare/366422338ece...6b86b12f79e8

struct At
{
 @property auto info() @safe @nothrow @pure @return const { return this; }

 @pure @nothrow @return ref int info2(ref int x) { return x; }
}

Which I assume before the change would be:

struct At
{
 @property auto info() @safe nothrow pure return const { return this; }

 pure nothrow return ref int info2(ref int x) { return x; }
}

I don't know about anyone else, but this doesn't compile in 2.066.
January 29, 2015
On Thu, 29 Jan 2015 04:54:38 +0000, Jesse Phillips wrote:

> A recent discussion over in digitalmars.D http://forum.dlang.org/post/rtwbtxigfeupvykpbamh@forum.dlang.org
> 
> talks about accepting @return... Here is an example from the PR: https://github.com/D-Programming-Language/dmd/
compare/366422338ece...6b86b12f79e8
> 
> struct At {
>   @property auto info() @safe @nothrow @pure @return const {
> return this; }
> 
>   @pure @nothrow @return ref int info2(ref int x) { return x; }
> }
> 
> Which I assume before the change would be:
> 
> struct At {
>   @property auto info() @safe nothrow pure return const { return
> this; }
> 
>   pure nothrow return ref int info2(ref int x) { return x; }
> }
> 
> I don't know about anyone else, but this doesn't compile in 2.066.

http://wiki.dlang.org/DIP25
this is a very recent thing, it wasn't coded when 2.066 was released.

January 29, 2015
On Thursday, January 29, 2015 05:02:58 ketmar via Digitalmars-d-learn wrote:
> http://wiki.dlang.org/DIP25
> this is a very recent thing, it wasn't coded when 2.066 was released.

I don't know if it's even fully coded up in git master, though clearly it's at least partially there, because @ was put on return as part of the PR that triggered that discussion. Regardless, it's _very_ new (IIRC, it's been less than a month since it was approved).

- Jonathan M Davis

January 29, 2015
    @property auto info() @safe @nothrow @pure @return const { return this; }

It is mesmerizing...   (@ _ @)
January 29, 2015
On Thursday, 29 January 2015 at 11:50:29 UTC, FG wrote:
>
>     @property auto info() @safe @nothrow @pure @return const { return this; }
>
> It is mesmerizing...   (@ _ @)

And soon its gong to look like this:

export @property auto info() @safe @nothrow @pure @return const { return this; }
January 29, 2015
On Thursday, 29 January 2015 at 05:02:58 UTC, ketmar wrote:
> http://wiki.dlang.org/DIP25
> this is a very recent thing, it wasn't coded when 2.066 was released.

Thanks, I like it.