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

Flagging Out of Memory panics is pretty disingenuous.

Unless Zig only does static allocation of memory (fixed stack and heap), it is equally at the mercy the Linux optimistic memory allocator.

With Linux, you can request your memory, get no error code, and then when you go to use it--BOOM.



Linux is only one of many, many different environments in which the same Zig code can be compiled to target. That's the point, you write your code in a portable, reusable manner, and it behaves correctly everywhere.


That can be disabled and is disabled in many situations where one would use C or C++ such as embedded devices. It can be disabled system wide or an application can disable it for itself.




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

Search: