digitalmars.D - rvalue references
- Namespace (6/6) May 12 2015 As far as I know, the problem (or at least one of the biggest
- Namespace (1/1) May 13 2015 No draft so far?
- bitwise (8/13) May 13 2015 Wouldn't DIP69 have to be dealt with first before this happens?
- bitwise (4/9) May 13 2015 Side note: DIP36 seems to be missing the table with the authors, status,...
- Namespace (6/17) May 13 2015 Huh, DIP36? DIP36 was rejected, but the authors (me and Dicebot)
- bitwise (12/24) May 14 2015 Makes sense, but if scope is dead, I assume it would have to be removed ...
- Namespace (8/35) May 14 2015 As Andrei said several times (recently here:
- Andrei Alexandrescu (2/4) May 14 2015 Evaluate its merit once we have everything else in. -- Andrei
- Namespace (3/8) May 14 2015 Short and meaningful. Thank you.
- bitwise (6/18) May 14 2015 If I understand Andrei's response correctly though, you will still have ...
- "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> (9/30) May 15 2015 There's been no official decision, AFAIK. I was just going from
As far as I know, the problem (or at least one of the biggest problems) for rvalue references was that they could escape. Since DIP25 is approved and already implemented this problem should be solved. Would it be possible to allow rvalues references now? I'm just curious what the mindfactory of D has in mind and what the scheme for that problem is.
May 12 2015
On Tue, 12 May 2015 08:54:15 -0400, Namespace <rswhite4 gmail.com> wrote:As far as I know, the problem (or at least one of the biggest problems) for rvalue references was that they could escape. Since DIP25 is approved and already implemented this problem should be solved. Would it be possible to allow rvalues references now? I'm just curious what the mindfactory of D has in mind and what the scheme for that problem is.Wouldn't DIP69 have to be dealt with first before this happens? There seems to be some overlap between DIP69 and DIP25. For example, isn't scope unnecessary for this code after DIP25? func(scope ref T t) { return t; // already illegal per DIP25, no need for scope } Bit
May 13 2015
On Tue, 12 May 2015 08:54:15 -0400, Namespace <rswhite4 gmail.com> wrote:As far as I know, the problem (or at least one of the biggest problems) for rvalue references was that they could escape. Since DIP25 is approved and already implemented this problem should be solved. Would it be possible to allow rvalues references now? I'm just curious what the mindfactory of D has in mind and what the scheme for that problem is.Side note: DIP36 seems to be missing the table with the authors, status, etc. Bit
May 13 2015
On Thursday, 14 May 2015 at 00:12:05 UTC, bitwise wrote:On Tue, 12 May 2015 08:54:15 -0400, Namespace <rswhite4 gmail.com> wrote:Huh, DIP36? DIP36 was rejected, but the authors (me and Dicebot) are below. I've heard that DIP69 is [quote]almost dead in favor of DIP25[/quote]. That's why I'm a bit confused and would like to know the scheme, if any. :)As far as I know, the problem (or at least one of the biggest problems) for rvalue references was that they could escape. Since DIP25 is approved and already implemented this problem should be solved. Would it be possible to allow rvalues references now? I'm just curious what the mindfactory of D has in mind and what the scheme for that problem is.Side note: DIP36 seems to be missing the table with the authors, status, etc. Bit
May 13 2015
On Thu, 14 May 2015 02:56:46 -0400, Namespace <rswhite4 gmail.com> wrote:On Thursday, 14 May 2015 at 00:12:05 UTC, bitwise wrote:Hmm.. so they are ;)Side note: DIP36 seems to be missing the table with the authors, status, etc. BitHuh, DIP36? DIP36 was rejected, but the authors (me and Dicebot) are below.I've heard that DIP69 is [quote]almost dead in favor of DIP25[/quote]. That's why I'm a bit confused and would like to know the scheme, if any. :)Makes sense, but if scope is dead, I assume it would have to be removed at some point. So I guess 'ref' could just take rvalues now that it's escape-proof right? Also, what becomes of the 'in' storage class? being just another word for 'const' seems like a waste. If it were up to me, I would say: 'scope' should be removed as a storage class, 'ref' should be left as is, and 'in' should adopt the behavior of 'ref' post DIP25 Bit
May 14 2015
On Thursday, 14 May 2015 at 16:53:04 UTC, bitwise wrote:On Thu, 14 May 2015 02:56:46 -0400, Namespace <rswhite4 gmail.com> wrote:As Andrei said several times (recently here: http://forum.dlang.org/thread/scaufixfdyyrbmijgitf forum.dlang.org?page=3#post-mit5lp:241kpt:24 :40digitalmars.com) auto ref will take care about rvalue references. I've only hoped that I could get a schedule for that or at least a confirmation. :) But interesting question, what will happen with scope, now that we have return ref.On Thursday, 14 May 2015 at 00:12:05 UTC, bitwise wrote:Hmm.. so they are ;)Side note: DIP36 seems to be missing the table with the authors, status, etc. BitHuh, DIP36? DIP36 was rejected, but the authors (me and Dicebot) are below.I've heard that DIP69 is [quote]almost dead in favor of DIP25[/quote]. That's why I'm a bit confused and would like to know the scheme, if any. :)Makes sense, but if scope is dead, I assume it would have to be removed at some point. So I guess 'ref' could just take rvalues now that it's escape-proof right? Also, what becomes of the 'in' storage class? being just another word for 'const' seems like a waste. If it were up to me, I would say: 'scope' should be removed as a storage class, 'ref' should be left as is, and 'in' should adopt the behavior of 'ref' post DIP25 Bit
May 14 2015
On 5/14/15 10:15 AM, Namespace wrote:But interesting question, what will happen with scope, now that we have return ref.Evaluate its merit once we have everything else in. -- Andrei
May 14 2015
On Thursday, 14 May 2015 at 17:50:35 UTC, Andrei Alexandrescu wrote:On 5/14/15 10:15 AM, Namespace wrote:Short and meaningful. Thank you.But interesting question, what will happen with scope, now that we have return ref.Evaluate its merit once we have everything else in. -- Andrei
May 14 2015
On Thu, 14 May 2015 13:15:34 -0400, Namespace <rswhite4 gmail.com> wrote:On Thursday, 14 May 2015 at 16:53:04 UTC, bitwise wrote:If I understand Andrei's response correctly though, you will still have to use 'auto ref' to get ref to bind to rvalues.. no? So if I'm right about the above, and scope is out, why not just use 'in' instead of 'auto ref'? BitIf it were up to me, I would say: 'scope' should be removed as a storage class, 'ref' should be left as is, and 'in' should adopt the behavior of 'ref' post DIP25 BitAs Andrei said several times (recently here: http://forum.dlang.org/thread/scaufixfdyyrbmijgitf forum.dlang.org?page=3#post-mit5lp:241kpt:24 :40digitalmars.com) auto ref will take care about rvalue references. I've only hoped that I could get a schedule for that or at least a confirmation. :)
May 14 2015
On Thursday, 14 May 2015 at 20:02:29 UTC, bitwise wrote:On Thu, 14 May 2015 13:15:34 -0400, Namespace <rswhite4 gmail.com> wrote:Yes, that's what I said. :) Besides, it would be horrible if rvalues could be bound to normal ref.On Thursday, 14 May 2015 at 16:53:04 UTC, bitwise wrote:If I understand Andrei's response correctly though, you will still have to use 'auto ref' to get ref to bind to rvalues.. no?If it were up to me, I would say: 'scope' should be removed as a storage class, 'ref' should be left as is, and 'in' should adopt the behavior of 'ref' post DIP25 BitAs Andrei said several times (recently here: http://forum.dlang.org/thread/scaufixfdyyrbmijgitf forum.dlang.org?page=3#post-mit5lp:241kpt:24 :40digitalmars.com) auto ref will take care about rvalue references. I've only hoped that I could get a schedule for that or at least a confirmation. :)So if I'm right about the above, and scope is out, why not just use 'in' instead of 'auto ref'? BitDon't ask me, I'm just a little light here.
May 14 2015
Don't ask me, I'm just a little light here.But I think it's because 'in' means 'const scope' and as you said, scope is out. ;)
May 14 2015
On Thu, 14 May 2015 16:12:36 -0400, Namespace <rswhite4 gmail.com> wrote:Which means 'in' is available! ;) BitDon't ask me, I'm just a little light here.But I think it's because 'in' means 'const scope' and as you said, scope is out. ;)
May 14 2015
On Thursday, 14 May 2015 at 06:56:47 UTC, Namespace wrote:On Thursday, 14 May 2015 at 00:12:05 UTC, bitwise wrote:There's been no official decision, AFAIK. I was just going from the impression I got from Walter & Andrei's posts. But `scope` as a storage class is still necessary, because there are many more kinds of references in D besides `ref`. You can think of `ref` implying `scope`. The next steps will be to a) complete the implementation of `return ref`, b) extend it to those other reference types like pointers, slices, classes and delegates, and c) close the holes (see the thread "RCArray is unsafe").On Tue, 12 May 2015 08:54:15 -0400, Namespace <rswhite4 gmail.com> wrote:Huh, DIP36? DIP36 was rejected, but the authors (me and Dicebot) are below. I've heard that DIP69 is [quote]almost dead in favor of DIP25[/quote]. That's why I'm a bit confused and would like to know the scheme, if any. :)As far as I know, the problem (or at least one of the biggest problems) for rvalue references was that they could escape. Since DIP25 is approved and already implemented this problem should be solved. Would it be possible to allow rvalues references now? I'm just curious what the mindfactory of D has in mind and what the scheme for that problem is.Side note: DIP36 seems to be missing the table with the authors, status, etc. Bit
May 15 2015