Efficiently passing structs

Namespace via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue May 5 15:58:34 PDT 2015


On Tuesday, 5 May 2015 at 21:58:57 UTC, bitwise wrote:
> On Tue, 05 May 2015 17:33:09 -0400, Namespace 
> <rswhite4 at gmail.com> wrote:
>
>> I've discussed that so many times... just search for auto / 
>> scope ref... ;)
>> It will never happen.
>>
>> See:
>> http://forum.dlang.org/thread/ntsyfhesnywfxvzbemwc@forum.dlang.org?page=1
>> http://forum.dlang.org/thread/ylebrhjnrrcajnvtthtt@forum.dlang.org?page=1
>> http://forum.dlang.org/thread/mailman.2989.1356370854.5162.digitalmars-d@puremagic.com
>> http://forum.dlang.org/thread/tkzyjhshbqjqxwzppdin@forum.dlang.org#post-mailman.2965.1356319786.5162.digitalmars-d-learn:40puremagic.com
>> http://forum.dlang.org/thread/hga1jl$18hp$1@digitalmars.com
>
> I did read some of these.
>
> Has anyone brought up simply allowing "in ref" or "const scope 
> ref" to accept rvalues? If DIPs 69 and 25 were implemented, I 
> don't see why this would be a problem. I agree that "const ref" 
> should not, but I don't see a problem with "const scope ref".
>
> I haven't seen a conversation that was strongly in favor of DIP 
> 36. Why hasn't it been rejected?
>
>   Bit

We proposed that in DIP 36:
http://forum.dlang.org/thread/ylebrhjnrrcajnvtthtt@forum.dlang.org?page=1

Some more interesting discussion parts:
http://forum.dlang.org/thread/4F84D6DD.5090405@digitalmars.com
http://forum.dlang.org/thread/km3k8v$80p$1@digitalmars.com?page=1
http://forum.dlang.org/thread/CAFDvkcvf6G8Mc01Tds6ydXqCZbfp1q-a-oeFVk6BGEtwCiUAqg@mail.gmail.com

As you can see there are debate for ages. Many people of the 
community really wants a solution, but since Andrei and Walter 
believe that it brings no real benefit, nothing has changed. I 
stuck with auto ref + templates if I need lvalues + rvalues 
(which is often the case in game dev).


More information about the Digitalmars-d-learn mailing list