3 ms·
How dependent is D nowadays on GC?
by forgotpwd16 6y ago
How dependent is D nowadays on GC?
- mhh__ 6y agoThe GC is still a key part of the language but it is increasingly only used for things that you wouldn't be able to do without a GC anyway (e.g. if you want to pass a closure anywhere without managing it's lifetime you need some kind of GC). Avoiding the GC has probably never been easier however, and D is already very good at avoiding the garbage in the first place. I even work on/for D and I'm not a huge fan of the GC, but it is also the case that these questions pop up on sometimes almost quasi-religious grounds: The GC is just a tool, if it gets in your way it's fairly easy to avoid in the sense that you don't call in, it doesn't stop.
- WalterBright 6y agoIf you use D as BetterC, it's impossible to use the GC.
- asalahli 6y agoBut BetterC doesnt have exceptions :(
- WalterBright 6y agoExceptions require more than the Standard C library.
- asalahli 6y agoI undersand. I didn't mean it as a criticism of BetterC :) I'm just getting into D and I love it so far. I do wish there was a way to turn off GC and still have all of the standard library available.