Hacker News new | ask | show | jobs
by Kranar 1223 days ago
D isn't a good substitute for C due to its garbage collector.

Yes, people always chime in about how you can disable D's garbage collector, but then you're stuck with an awkward language that lacks support for basic things like exceptions, closures, strings, slices, and a host of other features not to mention pretty much any third party library.

If you are willing to accept a GC then D might be a good choice, if you find it fun then by all means go for it, but it's no longer so clear cut at that point given the wealth of GC'd programming languages available.

1 comments

That's 100% bullshit

You can ignore the GC or totally suppress it with @nogc or even not even link it with -betterC flag

Having the GC optional is nice since you no longer need to use a scripting language to do your cli tools or utilities, it's there and well integrated

If you are a proper developer who care about speed and fast code, you'll want to develop your own STL anyways, just like C/C++ are already doing, just like Rust people are also doing to get faster compile speed, D gives C/C++ interop as well as full C11 compiler

So it's the perfect evolution of C, since it can compile and consume its ecosystem

You can even consume python and rust libraries, wgpu works great with D