News for hackers. Stuff that matters.
Re:Will Carbon Replace C++? by WalterBright on Monday February 27, 2023 @08:37PM (#34964601)
You can disable collections being run, but if the library uses the GC, then it uses the GC!

(Lots of D users use a mix of GC and explicit allocation. Each has their best use cases.)

May I ask what your concern is?

Re:Will Carbon Replace C++? by danbolt on Monday February 27, 2023 @10:35PM (#34965320)
I can’t speak for the parent, but I know there are programs that avoid garbage collection due to pauses affecting the business logic. I think developers in those situations often look to C, C++, or Rust as any particular library you reach for isn’t going to be introducing GC into your program.
Re:Will Carbon Replace C++? by WalterBright on Monday February 27, 2023 @11:50PM (#34965748)
The D's GC collection cycle does pause, but it does not run unless the GC is asked to do an allocation.

Hence, if you don't do GC allocations, or at least do not do them in your realtime loop, it will not pause.

D is not a GC language. It's a language with an optional GC. (It also does not have the code gen compromises that fully GC languages rely on, such as write gates.)