Re:Zig – Type Resolution Redesign and Language Changes
by thezipcreator on Thursday March 12, 2026 @01:26AM
(#47346847)
sure, but when I've written zig this has never been an issue for me. `defer` makes memory management really easy.
If you want to auto-generate destructors, zig has really good comptime features that can let you do that.
Re:Zig – Type Resolution Redesign and Language Changes
by CyberDildonics on Thursday March 12, 2026 @10:49AM
(#47351381)
defer is still something you have to consciously put in every time so it destroys the value semantics that C++ has, which is the important part. You don't have to "just write defer after a string", you can just use a string.
The 'not a problem for me' is what people would say about manual memory in C too. Defer is better but it isn't as good as what is already in use.
There are no destructors so all the memory ownership footguns are still there.