4 ms·
I could list features, but as an otherwise happy C programmer I can confidently state that Zig makes it substantially easier to write fast, correct programs, be
by hansvm 3y ago
I could list features, but as an otherwise happy C programmer I can confidently state that Zig makes it substantially easier to write fast, correct programs, be sure they're correct, and maintain those two properties as I modify those programs.
A smattering of points to look at include comptime (replacing the preprocessor [0], scripted lookup tables, generics, ...), non-null pointers, the community ethos of a principle of least power (e.g., any part of the stdlib you'd expect could be used on an embedded device can in fact be used there), exhaustive switching, cross-compilation, and errdefer.
[0] Not being textual is the source of comptime's power, but you'll never do something like write Zig code that looks like Fortran. Comptime adds some capabilities and takes away others. The tradeoff is pretty positive IMO.