Zig is apparently not much more complicated than C. It's got the same focus on low-level programming and manual memory management as C does. Doesn't support operator overloading though, and probably never will. :(
Re:The case for a modern language
by MaxBarraclough on Saturday January 22, 2022 @04:16PM
(#30040899)
I didn't mention Zig because as far as I know there's no Safe Zig subset, nor are there plans to develop one. Zig itself is an unsafe language. [0][1]
That's the nice thing about Safe Rust, it's a proper safe language akin to Java and JavaScript, while retaining high performance, plain old ahead-of-time compilation, and no garbage collector. Zig isn't playing the same game.
[0] https://www.scattered-thoughts.net/writing/how-safe-is-zig/
I think the real point is that modern languages can significantly improve on the major issues with C, particularly its undefined behaviour and how that translates to real-world security issues, without significantly impacting performance. Rust (and in particular its Safe Rust subset) has been competing more with C++ than with C, but the point is still there.
I admit though that I don't have hard numbers on what would be the performance cost of writing an OS (for example) in Rust rather than C.