What is the current progress on "Safety and Memory Management"?

maik klein via Digitalmars-d digitalmars-d at puremagic.com
Tue Jul 19 06:01:23 PDT 2016


On Sunday, 17 July 2016 at 06:05:27 UTC, qznc wrote:
> If I were your advisor, I would suggest not to think about 
> Phobos. Just build your own library and publish via dub. 
> Getting a contribution into Phobos is not a good use of time 
> for a bachelor thesis.
>
> Apart from that: Ownership semantics as a library is a great 
> topic! Go for it.

That was the initial idea, but its not completely feasible to 
have it as a standalone library because a few things in phobos 
just need to be fixed for it to be practical. For example 
"Tuple", I could and will have a separate Tuple implementation 
but it would be very nice if I could at one point forward some 
changes to phobos. Probably in combination with a DIP and why 
those changes are needed.

Also some safety features of Rust could also be implemented as a 
library for example Sync and Send. See 
https://doc.rust-lang.org/nomicon/send-and-sync.html

My major concern is that I am not sure if the D community wants 
to have similar ownership semantics of C++ / Rust.

> Walter and Andrei have, in the past, stated many times that 
> they believe Rust's approach to the memory safety problem is 
> too complex and not a good fit for D. They have been exploring 
> alternative solutions for a while now, and will probably 
> announce something eventually.
>
> Nothing significant gets added to the language, runtime, or 
> standard library without their approval - no matter how popular 
> it is with the community.
>
> So, make sure that you get explicit pre-approval from them 
> before you waste your time, unless everything you want to do 
> can be implemented as a normal stand-alone DUB package.

I don't want to implement any memory safety at all, I just want 
to implement a proper library to avoid the GC. I just listed Rust 
because Rusts's std lib is open source, readable and feature 
rich. (+ I am already familiar with it)


More information about the Digitalmars-d mailing list