4 ms·
Is it possible to use the standard library without the GC though? It would be nice to have at least some string/container/IO libraries that are designed to be u
by cyber_kinetist 5y ago
Is it possible to use the standard library without the GC though? It would be nice to have at least some string/container/IO libraries that are designed to be used ergonomically without the GC.
- WalterBright 5y agoYes. Not much of the library uses the GC.
- mhh__ 5y agoLarge amounts of the standard library are deliberately lazy so don't actually allocate at all. Exceptions however do end up using the GC, but there is a flag to work around that. Libraries that don't use it at all are available. At work we have a large library, being a hedge fund, that must be consumed from Excel. This means it cannot use the GC because [reasons], it's not a particularly big issue. Garbage collection is not a bug, by the way. It's one of biggest productivity wins D has over C++. Performance is often as near as makes no difference identical, only you now eliminate all memory safety issues without thinking about lifetimes. D also has very nice composable allocators in the standard library