3 ms·
what are the advantages of running GC only when allocations are happening, instead of running concurrently? Is the idea that you can explicitly control the beh
by dominotw 10y ago
what are the advantages of running GC only when allocations are happening, instead of running concurrently?
Is the idea that you can explicitly control the behavior of GC by tuning your allocations? Is it burdensome for the programmer to constantly think about this while writing code?
- p0nce 10y ago> what are the advantages of running GC only when allocations are happening, instead of running concurrently? That way you don't need a dedicated thread for the GC (current one is hijecked). > Is it burdensome for the programmer to constantly think about this while writing code? Not really. I sell real-time software in D, you don't constantly think about this when writing code. It's no more burden that avoiding allocations in real-time software in C++.
- adrianratnapala 10y agoBut avoiding allocations in real-time C++ is a burden to some (increasingly common) kinds of programmers. The kids today are so indoctrinated in modern C++ that they don't stop to think that `vector<>::push_back()` potentially allocates behind the scenes. Writing real-time code requires a certain mentality that is at odds with modern frameworks. I expect nice languages like D have similar cultural issues.
- p0nce 10y agoIf you need a feel of what the community values (apart from rants), have a look at the forums. https://forum.dlang.org/ https://forum.dlang.org/ D is backed by companies like Sociomantic and Weka.io that operates in high-performance domains.
- CyberShadow 10y agoFWIW, D's @nogc makes it easy to trap code that allocates accidentally.