News for hackers. Stuff that matters.
Re:How safe is Zig? by kaba0 on Friday June 24, 2022 @06:25AM (#31859813)
Reference counting is an incomplete solution it itself - it leaks circular references, and on multithreaded programs it is quite slow. Though some optimizations could be done statically to improve on that.

All in all, a mark-and-sweep will likely be faster (in throughput at least) let alone a good GC.

Re:How safe is Zig? by randyrand on Friday June 24, 2022 @01:06PM (#31865796)
Circular references wouldn’t matter.

The programmer would still decide when to free the object, not some automatic system. Manual memory management, with Ref Counting just to add some additional Use After Free checks.