|
|
|
|
|
by WalterBright
1842 days ago
|
|
> language features that require said GC A whole two features: 1. concatenating strings using the ~ operator. You can concatenate strings using malloc if you prefer. 2. closures that escape the context of the function they enclose. Instead, write a struct with fields representing the values, and make the lambda a member function of that struct. Allocate the struct instance any way you wish. The GC is a convenient feature with lots of nice uses. Programming in D is not impaired by not using it. |
|
It's a short list, for sure, but thats not the point: Anyone looking into using D without GC will see that there are some language features that require special care.
At that point it becomes a valid question why one should learn about the pitfalls of GC free D, when one already knows that about the currently used language.
GC free D is low friction, but seemingly not low enough for uptake from interested parties.