News for hackers. Stuff that matters.
Re:Zig in 30 Minutes by dilap on Sunday January 03, 2021 @09:45AM (#25622034)
Yes, you're right. From the manual:

> [Once a variable is set to undefined], it is no longer possible to detect that the value is undefined. undefined means the value could be anything, even something that is nonsense according to the type. Translated into English, undefined means "Not a meaningful value. Using this value would be a bug. The value will be unused, or overwritten before being used."

> In Debug mode, Zig writes 0xaa bytes to undefined memory. This is to catch bugs early, and to help detect use of undefined memory in a debugger.

https://ziglang.org/documentation/master/#undefined

There are no comments on this comment yet.