DIP 1021--Argument Ownership and Function Calls--Formal Assessment

Walter Bright newshound2 at digitalmars.com
Mon Oct 28 20:23:50 UTC 2019


On 10/28/2019 12:23 PM, jmh530 wrote:
> Is there a connection between this DIP and the restrict qualifier in C? This DIP 
> basically ensures that in @safe code, if a piece of data is accessed only 
> through scope pointers, then there must be only one mutable pointer to said data 
> or they are all const. That there is only one mutable way to access data sounds 
> like restrict to me. I would think that would enable some optimizations in @safe 
> code.

I hadn't thought of that, it is an interesting observation.


More information about the Digitalmars-d-announce mailing list