May 05, 2015 Re: Efficiently passing structs | ||||
---|---|---|---|---|
| ||||
Posted in reply to Namespace | On Tue, 05 May 2015 18:58:34 -0400, Namespace <rswhite4@gmail.com> wrote: > On Tuesday, 5 May 2015 at 21:58:57 UTC, bitwise wrote: >> On Tue, 05 May 2015 17:33:09 -0400, Namespace <rswhite4@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 Awesome, thanks for the links. I haven't read all of these yet. > Many people of the community really wants a solution +1 > I stuck with auto ref + templates if I need lvalues + rvalues (which is often the case in game dev). Yeah... structs/template-auto-ref is fine for matrices, vectors, quaternions, colors, etc, but I'm not gonna be able to get away with that for any kind of shared assets like textures, materials, etc, etc.. so I hope this eventually gets fixed. > but since Andrei and Walter believe that it brings no real benefit, nothing has changed. I suppose this is like the C++ argument "always use std::vector instead of std::list because CACHE!", but there's a time and place for everything.. Bit |
May 06, 2015 Re: Efficiently passing structs | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ali Çehreli |
On 05/05/2015 11:49 AM, Ali Çehreli via Digitalmars-d-learn wrote:
> On 05/05/2015 07:14 AM, bitwise wrote:
>
> > I don't see how someone could arrive at the above
> > solution without showing up here and asking first.
>
> It was the same with me. :) Then I wrote a short section about it:
>
>
> http://ddili.org/ders/d.en/lvalue_rvalue.html#ix_lvalue_rvalue.auto%20ref,%20parameter
>
>
> Ali
>
>
Are there plans to make this as a book rather than an e-book? I find books much more useful.
|
May 06, 2015 Re: Efficiently passing structs | ||||
---|---|---|---|---|
| ||||
Posted in reply to Charles Hixson | On 05/06/2015 11:24 AM, Charles Hixson via Digitalmars-d-learn wrote:
>
>
> On 05/05/2015 11:49 AM, Ali Çehreli via Digitalmars-d-learn wrote:
>> On 05/05/2015 07:14 AM, bitwise wrote:
>>
>> > I don't see how someone could arrive at the above
>> > solution without showing up here and asking first.
>>
>> It was the same with me. :) Then I wrote a short section about it:
>>
>>
>> http://ddili.org/ders/d.en/lvalue_rvalue.html#ix_lvalue_rvalue.auto%20ref,%20parameter
>>
>>
>> Ali
>>
>>
> Are there plans to make this as a book rather than an e-book? I find
> books much more useful.
I was hoping to have it printed before DConf 2015 but it looks like we will be missing that date.
I have to credit especially Luís Marques for his excellent work as the editor (who happens to be more qualified than I for writing this book anyway). Neither he nor I want to rush this before feeling good about the result.
Ali
|
Copyright © 1999-2021 by the D Language Foundation