Re:Why Zig over C for Systems Programming
by asveikau on Friday November 13, 2026 @01:26PM
(#50487647)
Just from the first example:
I think you can represent C better than this. I like to focus on one cleanup block, and exploit the fact that free(NULL) is a no-op.
Although note that this assumes calloc(sizeof *u, 1) initializes pointers to NULL, IIRC assuming the bit pattern of NULL is all zeroes is technically against the standard but every system you're likely to target will still work.
[ Parent
| on HN ]
There are no comments on this comment yet.