Hacker News new | ask | show | jobs
by adkadskhj 1803 days ago
Curious, why do you want a GC'd Rust? I imagine there's something about Rust that you feel would be improved with a GC?
1 comments

I like not having to think about lifetimes and ownership when I'm building a tree for example, and for most of what I do I can afford the performance hit.
Is there a reason you'd not just throw RC-like solutions on it? Ie the GC is basically going to employ a handful of techniques with overhead like RC, memory Arenas, etc - which you could also use in Rust.

So i imagine you know this, is it the syntax you're trying to avoid? Ie wrapping a lot of things in RC's is annoying?

A few reasons. Like you said, syntax, wrapping and unwrapping is annoying. Also, RC doesn't cover cases with cyclic references. I think the difference is that for me GC is the default. For me, you need a good reason to not use a GC. Moderns GCs are very, very good and like I said I'd need a good reason to not use it. That's personal though, and I understand that not everyone agrees.
Yea, i can see that. As much as i dislike Go these days, their GC is impressive as hell. I can imagine future GC's will learn a lot from Go.
Has it improved? Last I heard Java’s tunable GCs still have much better throughput, while Go allows stack allocation more often.

(Yes, GC tuning is painful, but better than rewriting code hoping you might end up with the same behavior.)

What do you mean by "impressive as hell"? From my (limited) understanding Go's GC is average.
I don't know this field, perhaps my bar is low because of Python lol, but Go's GC has very short GC pauses. So short that it makes non-GC'd usecases less attractive imo.

My big issue with Go's GC, or GC's in general, is consistency. Go's GC can still be variable in pause time iirc. But it's been ~3 years since i've worked in it - so maybe my memory is wrong :)