After 8 months of development, the programming language Zig 0.11.0 has been published. This language was developed with the support of the organization Zig Software Foundation. Zig is being proposed as a modern replacement for C, maintaining its advantages such as simplicity, flexibility, predictability, and ecosystem, while also introducing innovations for more ergonomic and safe development. Some of the key features of Zig include:
- A modern system of types that prioritizes safety, performance, and clarity. This includes optional types, alignment as part of the type, integer types with dimension from 0 to 65535 bits, union types, type sums, and more.
- Limited code execution during compilation, which enables metaprogramming without macros and preprocessor.
The main innovations in version 0.11.0 include:
- Significant improvements to the backend for compiling Zig into C. This allowed for the removal of the old C++ compiler previously used for promoting Zig. The new promotion process involves the following steps:
- The WASM2C.C file compiles the system compiler, enabling the translation of .WASM files into C representation.
- Wasm2c translates the ZIG1.wasm file (containing a cut copy of the Zig compiler) into ZIG1.C, which is then compiled again by the system compiler.
- Zig1 uses the relevant source code from the repository to compile ZIG2.C, which is compiled by the system into ZIG2 (the second stage of the compiler, no longer a cut copy).
- Zig2 (using the backend for LLVM) compiles the final executable ZIG file (third stage).
/Reports, release notes, official announcements.