Would the ownership model make D lang as complicated as Rust?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Tue Nov 17 18:49:53 UTC 2020


On Tuesday, 17 November 2020 at 18:02:00 UTC, Max Haughton wrote:
> Rice's theorem means you can't just let the compiler do it for 
> you,

We probably can't, but since we are talking finite entities you 
can enumerate all possibilities in finite time, so you need a 
different line of argumentation I think.

  > What Rust shows us that a
> conservative approach (i.e. annotations from the programmer and 
> the exact rules the borrow checker allows) is more than enough 
> to guarantee safety and manage memory productively.

Yes, and there are many other ways to annotate and constrain the 
search space. Clearly not trivial... But this is not the end, it 
is the beginning...

> D is already going in the right direction, the only issue 
> really is that (as they are now) pointers are insufficiently 
> expressive to be both safe and (say) act like C++ smart

Yes, you need a type system that differentiate more to make it 
tractable...





More information about the Digitalmars-d mailing list