DIP 1021--Argument Ownership and Function Calls--Community Review Round 1

Walter Bright newshound2 at digitalmars.com
Fri Jul 19 01:24:24 UTC 2019


On 7/18/2019 4:31 AM, Olivier FAURE wrote:
> Rust as it exists today is a vast language designed almost from the ground up to 
> accommodate the borrowing model. It relies on several features that do not (and 
> may never) exist in D, so saying "we're going to use a memory model like the one 
> Rust has" is extremely vague,

The only one mutable pointer XOR one or more const pointers is not a difficult 
concept. A sufficient description of it is included in the DIP, and a link 
provided for those who want to learn more.

Also, the DIP does not say "we're going to use a memory model like the one Rust 
has."


> and doesn't explain how various corner cases will 
> be handled.

Please enumerate them.

Keep in mind that the argument tracking code is already in the compiler, it was 
needed for DIP25 and DIP1000. This is pointed out in the DIP.


> This is especially true for this DIP, which explicitly doesn't include 
> function-wide data flow analysis like Rust does.

Right, it's restricted to function calls.



More information about the Digitalmars-d mailing list