Hacker News new | ask | show | jobs
by jfo 3071 days ago
"Zig does not support RAII or operator overloading because both make it very difficult to tell where function calls happen just by looking at a function body."

more in the 0.1.1 release notes! http://ziglang.org/download/0.1.1/release-notes.html

"Zig's standard library is still very young, but the goal is for every feature that uses an allocator to accept an allocator at runtime, or possibly at either compile time or runtime."

more in this wiki! https://github.com/zig-lang/zig/wiki/Why-Zig-When-There-is-A...

1 comments

>"Zig does not support RAII or operator overloading because both make it very difficult to tell where function calls happen just by looking at a function body."

How about showing an error if you don't call the deconstructor manually?