logoalt Hacker News

jayd16 • today at 4:49 PM • 3 replies • view on HN

It's only surrendered control if you refuse to understand it and how to control it.


Replies

generichuman • today at 7:58 PM

The (Tracing) Garbage Collector abstraction isn't really designed to be controlled though. You can understand the implementation and write code against that, but at that point, why not switch to something that you can genuinely control?

I'm not saying manage memory manually. You can switch to a language that is reference counted. Then at least that abstraction guarantees deterministic deallocation.

That comes with another set of trade-offs such as having to pay attention to atomic reference counts, making sure there's no cycles, maybe even treating some graphs as arenas to avoid chained deallocations, but the abstraction itself is designed to be deterministic and is more easily controlled.

unrented7977 • today at 5:29 PM

Exactly. You have a shocking amount of control over the GC if you bother to learn. Surrendering control is a choice the programmer makes by not understanding their tools.

lilbigdoot • today at 7:13 PM

There's still limits on that control.

➕ show 1 reply