News for hackers. Stuff that matters.
Re:Modern C for C++ Peeps by zozbot234 on Saturday January 07, 2023 @07:26PM (#34294647)
> It's essentially a cop out to not have to think about ownership and lifetime

Not a cop out. Something very much like Rc<> is needed whenever an object's lifecycle might be independently extended by multiple referencing "owners", none of which is subsumed by the others. That's a matter of broad high-level design that can't generally be avoided, least of all in a multi-threaded context (as shown by the use of Arc<>).

There are no comments on this comment yet.