logoalt Hacker News

tjofftoday at 3:41 PM3 repliesview on HN

GC is such a mistake though, you don't have to use rust but to never have to think about memory is a disservice to the programmer. Because that is something you always should do, and if you do then GC is nothing but a hindrance.

For scripting etc. it is perfect though.


Replies

wild_eggtoday at 4:15 PM

Why does having. GC mean not thinking about memory? I think about memory constantly in GC languages because I still want it to perform well.

The biggest difference is the failure modes. If I'm not thinking about memory, my RSS is higher or a bit of extra CPU time goes to GC. Both of those are radically better than UAF or buffer overruns. Good trade IMO.

show 1 reply
rsyringtoday at 4:12 PM

For a lot of programming tasks, HAVING to think about memory is a disservice.

That's part of the reason why Python, go, Ruby, etc. are so popular.

There is no one right answer, it's very dependent on what's being built and where the ROI for the programming effort comes from.

show 1 reply
quotemstrtoday at 7:50 PM

Even if you're one of those people who believes the highest levels of performance require manual memory management (I'd disagree, but whatever), you'd do well to consider the performance of real-world GC against performance of the Arc/Box/dyn/clone-heavy "high-level Rust" [1] [2] that people and LLMs usually write.

Maybe you can write a carefully-tuned arena-and-slotmap that beats the pants off any GC. GC doesn't have to compete against P99.9 systems programming excellence. It has to compete against an endless soup of Arc, Box, and clone, and it will win this match without breaking a sweat.

[1] https://hamy.xyz/blog/2026-01_high-level-rust

[2] https://llogiq.github.io/2020/05/30/hi.html

show 1 reply