C is a low-level systems programming language that offers minimal abstraction over memory and assembly. While it is highly portable and suitable for its intended purposes, it is not without flaws. Zig, a new systems programming language, aims to address some of these issues. Zig introduces comptime parameters and functions, allowing for execution during compile-time, which can help avoid errors caused by textual replacement preprocessing. Zig also provides manual memory management, but with safety tools to prevent memory leaks. It uses optionals instead of null references, and slices instead of pointer arithmetic, resulting in safer code. Zig’s type system also improves error handling and allows for more expressive syntax. Overall, Zig seeks to improve upon the shortcomings of C while maintaining some of its power and flexibility.
https://avestura.dev/blog/problems-of-c-and-how-zig-addresses-them