3 ms·
> On modern OSs you can write Zig and just ignore allocation errors. I can ignore errors, but I still need to free memory manually if I want to avoid memory le
by Panzerschrek 5mo ago
> On modern OSs you can write Zig and just ignore allocation errors.
I can ignore errors, but I still need to free memory manually if I want to avoid memory leaks. Languages like C++ or Rust have destructors, which do the job for me.
> This language exists to supercede or supplement C
There are way better alternatives, like Rust. Even C++ is better.
- lionkor 4mo agoZig has defer, your point is quite invalid.
- Panzerschrek 4mo agodefer can be forgotten to be written. C++ always calls destructors for local variables without additional programmer's intervention needed.