3 ms·
I learned D and then solved Advent Of Code 2019 with it. Like other people above, I really liked the language, and I wish could use it at work. For me it hit
by olvy0 4y ago
I learned D and then solved Advent Of Code 2019 with it.
Like other people above, I really liked the language, and I wish could use it at work. For me it hit a good spot midway between C# and C++. The documentation was complete enough for me. Although IMO AOC isn't representative of "real world" programming.
Regarding the GC, I had no major problems with it, but when faced with frequent allocations it performed slightly worse than what I'm used to from C#, in terms of memory consumption. In C# code, in places where I'm not concerned with performance, I'm used to allocate many small and temporary dictionaries freely without a hitch, the dotnet GC does a great job of releasing them as I go along.
In D however I wrote code using the same style (allocating relatively small temporary dictionaries in a loop) and saw memory usage ballooning very quickly, to several GBs.
At the end the intended solution for the AOC problem shouldn't have involved this many allocations anyway, so I didn't spend time investigating this too deeply.
Small dynamic arrays did not cause this problem, though, as far as I remember, the GC seemed to collect them well enough.