DIP 1021--Argument Ownership and Function Calls--Final Review
timon.gehr at gmx.ch
Fri Sep 20 00:51:27 UTC 2019
On 19.09.19 11:09, Olivier FAURE wrote:
> No, Rust isn't the only possible model for memory safety.
> Reference-counting isn't the only possible memory-safe data structure.
> The "foobar(rcObject, &rcObject.data)" problem that has been floated
> around for a few years isn't the only challenge to implementing a safe
> GC-less model.
> The reason I'm strongly opposed to this DIP, is that it should be based
> on a thorough analysis of possible memory safety models, advantages of
> different models over each other, and what model would be most suitable
> for D and why.
> Instead, it acts like the analysis was already done and everybody agreed
> the Rust model was the best and all that's left is implementation details.
I'd be happy and excited if that was the extent of the problems! @live
is not the Rust model! Rust does not have a language built-in notion of
unique pointer, and it is not necessary (nor sufficient) to have it if
your borrowing works. Mixing up GC pointers and unique pointers is a
terrible idea. Why is @live trying to _remove_ GC from D?
More information about the Digitalmars-d