Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I saw mentions of Zig here often, so I decided to look at the docs to see what features it has. I had to scroll through all the docs only to find myself disappointed by the fact that Zig doesn't help with memory management in any way and advices to use comments and careful coding instead. And what adds to the disappointment is that its plus/minus operators do not catch overflow. If I wanted undefined behaviour, I could just use C/C++ as no language can compete with them in this regard.


> plus/minus operators do not catch overflow

They do (in Debug and ReleaseSafe modes)


Why not have the same behaviour everywhere? Because they are adapting the language to legacy CPUs not capable of detecting an overflow?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: