News for hackers. Stuff that matters.
Re:Rewriting in Rust by kev009 on Thursday August 20, 2026 @01:46AM (#49370804)
I wouldn't consider Rust a manual memory environment. There are ways to do that at edges if needed, but it is otherwise very much automatic which is kind of the whole point of its design.
Re:Rewriting in Rust by frollogaston on Thursday August 20, 2026 @03:37AM (#49371566)
What most people mean when they say this is GC vs no GC. Rust is the latter. You have to care about ownership unless you're wrapping in Rc/Arc.
Re:Rewriting in Rust by TonyStr on Thursday August 20, 2026 @03:45AM (#49371618)
I agree with you, but I just want to point out that there are other seamless solutions to memory management like refcounting, used by for example GDscript (Swift? Perl?). You definitely wouldn't consider this manual memory management
Re:Rewriting in Rust by yxhuvud on Thursday August 20, 2026 @03:59AM (#49371699)
No, I would consider refcounting as variants of GC.
Re:Rewriting in Rust by ghusbands on Thursday August 20, 2026 @06:51AM (#49372891)
Refcounting is indeed a form of GC (and the languages that want to handle cycles then need an extra form of GC on top of it).
Re:Rewriting in Rust by frollogaston on Thursday August 20, 2026 @11:50AM (#49376321)
GC specifically means you leave unreferenced mem on the heap until it gets collected in one big sweep later.

ObjC/Swift are also their own special class of refcounting because it's done at compile time at least partially. Whereas spamming Rc/shared_ptr would do it always at runtime and be quite slow.

Re:Rewriting in Rust by ghusbands on Wednesday September 02, 2026 @06:27PM (#49543447)
You're referring specifically to tracing garbage collection. When a reference count reaches zero, that garbage is collected, often recursively. Among programming language designers, ARC is considered a GC strategy.

https://en.wikipedia.org/wiki/Garbage_collection_(computer_s...

https://users.rust-lang.org/t/reference-counting-garbage-col...

Re:Rewriting in Rust by vrighter on Thursday August 20, 2026 @09:47AM (#49374525)
if refcounting is gc, then c++ is a garbage collected language. It has std::shared_ptr
Re:Rewriting in Rust by frollogaston on Thursday August 20, 2026 @01:25PM (#49377565)
Refcounting isn't GC, but also C++ isn't a refcounted language. You could spam shared_ptr everywhere, but it's not designed for that and probably wouldn't be performant. And because of that, realistically all your libs take raw pointers, so you still have to unwrap your shared_ptrs then be back to managing ownership.

Swift has refcounting built into the language and assumed everywhere. You could always use raw refs in Swift, but that's not the norm.

Re:Rewriting in Rust by worik on Thursday August 20, 2026 @04:34PM (#49379899)
No

E.g. in Swift the reference counting is automatic a d implicit

In C++ it is manual and explicit

Re:Rewriting in Rust by frollogaston on Thursday August 20, 2026 @01:36PM (#49377689)
I wouldn't consider Swift manually managed, but also not GC. And not being GC has some practical implications like needing to break cycles yourself, so you need to at least be aware of ownership a little. It's like a manual transmission vs automated manual vs true automatic, AMT removes most of the work but still cannot be treated like full auto.
Re:Rewriting in Rust by TonyStr on Friday August 21, 2026 @03:06AM (#49384769)
Good point, I like your formulation