rvalue references

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Apr 24 12:11:55 PDT 2013


On 4/24/13 3:08 PM, Tove wrote:
> On Wednesday, 24 April 2013 at 12:38:19 UTC, Andrei Alexandrescu wrote:
>> On 4/24/13 6:27 AM, Diggory wrote:
>>> Anyway, it seems in general that everyone thinks DIP25A should be
>>> implemented, or am I mistaken?
>>
>> I'd like to work a bit more on it before a formal review.
>>
>> Andrei
>
> If you find the time one day, please revisit the "Taking address" section.
>
> I'm convinced that the goal of DIP25 could be fully realized even with
> some of the restrictions relaxed/lifted, with less code-breakage as result.
>
> In particular:
> Allowing '&' for non-ref parameters and "Stack-allocated locals" in
> @system.
>
> It encourages bad programming style where heap is preferred over stack,
> just to silence the compiler. Yes '&' is dangerous but it's a separate
> issue, why conflate a "Sealed references" DIP with restrictions on
> normal "non ref" C-style systems programming?
>
> Thanks for reading this far...

I agree. At any rate, DIP25 is on the aggressive side right now. I think 
we should first implement the noncontroversial parts and defer 
discussion on the breakages.

Andrei


More information about the Digitalmars-d mailing list