* Debugging is easier, faster, and more straightforward
* Fewer bugs due to footguns in the language
* Typical Zig code runs faster than typical C++ code. Part of this is due to Zig's safety features - there are design optimizations for performance that I won't even attempt in C or C++ because it's footgun city. Meanwhile in Zig it's actually completely safe in debug builds; you get a compile error or runtime panic if you mess up something.
* Floating point operations work on f16 and f128 without a dependency on SoftFloat library
* Cross compilation is trivial
* Comptime features make build options feasible and maintainable, such as enabling/disabling logging, whether to link libc, whether to link llvm, whether to enable tracy profiling, etc.
* Zig's error handling makes correct code the default instead of the other way around in C++
* The std lib HashMap, ArrayHashMap, and ArrayList data structures are really nice
* If the compiler is written in Zig, then adding a new target backend to the Zig compiler makes the Zig compiler work on that target. With another language we are stuck only supporting whatever that language supports.
Not only that but the Zig compiler available for download today is already backed by majority of lines of code written in Zig rather than C++; what is available today is already partially self-hosted. For example the following features are already written in Zig, not C++: `zig fmt`, `zig translate-c`, the command line interface, `zig cc`/`zig c++`, `zig build`, the cache system, compiler-rt, the macOS linker, and compile error checks that operate before type checking.
Reading Zig's std lib HashMap code the first time was an unforgettable experience for me.
I've spent literally months on some state of the art hash table papers, implementations and tons of hash functions, and Zig's HashMap implementation has got to be right up there with some of the best and most performant out of the box.
However, what impressed me most was just the level of control offered by the interface, and how clean and readable the code is.
1. Shows to others that your language is capable of a project of moderate complexity, as well as display what an "idiomatic" version of writing code is
2. Remove dependencies on parts you can't control (once you rewrite it in Zig, rather than C++, you don't need to worry about new C++ features or deprecations between versions)
3. Writing code in the language helps catch bugs in the language specification and in the compiler's implementation of the language.
These are just the ones off the top of my head, but people with more PL-Design experience may be able to elaborate.
I know it's entirely other end of the language spectrum, but I think that's why Typescript got successful while Flow did not; Typescript is in Typescript, while Flow is in OCaml. And nobody knows OCaml.
OTOH, eslint is making waves now and it's in golang, so. Who knows.