Comment

Comment by Ace17

To me, garbage collection is a hack, trying to workaround the fact that we don't know how to deal with ownership. This is something Rust and C++ get right (unique_ptr, the whole Rust ownership system), and I would definitely prefer D being based on an ownership system, rather than a rogue thread randomly scanning your memory for things that look like addresses.

However, the garbage collection in D turns out not to be an issue in practice. In D, you do have destructors and deterministic deallocation when you want to (in one word: RAII).

parent Ace17 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton