3 ms·
Bad garbage collector implementations, but not GC in general. malloc/free can have latency spikes too. Also not every programming problem in the world is a me
by rwmj 6y ago
Bad garbage collector implementations, but not GC in general. malloc/free can have latency spikes too.
Also not every programming problem in the world is a memory-constrained hard real time problem - in fact, I would say almost all of them are not.
Memory ownership is certainly an interesting thing to have in your arsenal, but a whole class of problems (especially anything with a graph or modestly complex interlinked data structure) can't easily be reasoned about using this model, or you end up copying stuff anyway to get around the borrow checker.
Having said all that, I'd really like to see a language that lets you use a garbage collector 99% of the time for ease of use, but allows you to use other models for the small sections of the code which need it or within certain designated real time threads.
- mhh__ 6y agoD let's you do that if you want.
- megameter 6y agoI beg to differ. For a sufficiently large time scale, every programming problem is a memory-constrained hard real time problem.
- vips7L 6y agoYou're looking for D! https://dlang.org/spec/function.html#nogc-functions https://dlang.org/spec/function.html#nogc-functions