Originally posted by microcode
View Post
The language used to not be garbage collector oriented but various functionalities require a garbage collector currently such as string splitting. Yeah, it's fast to allocate but collection is actually pretty slow still (unless they've changed it in the past few years). If it's a real-time application, it's extremely important to remember it's garbage collected since you will fight the GC any time it's collecting unfortunately. If you wish to avoid the GC, there are various rules in which you have to follow and nothing within the compiler or current standard library (phobos still?) to enforce it.
Rust is safer than D in my opinion since it uses language rules to guide the user to correct usages of the allocator rather than doing it pragmatically at runtime (which will still have a chance of memory leakage on abuse anyways). I'm not particularly fond of the Rust syntax honestly but it's currently what I would call the most probable"Next" language because of its approach. I can build a real-time application in Rust without having a few hundred lines of complicated code (possibly more) fighting the GC anytime it collects while I gain semantics that help me from fucking up memory management.
Comment