Zig 2016
If it isn't written, it doesn't happen - no hidden control flow, no hidden allocations.
Influenced by: C c++ go rust
Zig is a modern systems language and toolchain that aims to be a "better C": fast, explicit, and free of hidden behavior. There is no garbage collector and no hidden allocations - memory is managed manually through Allocator interfaces that are passed explicitly to any code that allocates, with defer/errdefer handling deterministic cleanup. Combined with comptime (running real Zig at compile time) and first-class C interop, it gives you C-level control with far fewer footguns.
What makes it distinctive
- No hidden allocations: any function that needs memory takes an
Allocatorparameter explicitly, so allocation is always visible at the call site. - Manual memory management with NO garbage collector and NO RAII destructors - instead you use
deferanderrdeferto schedule cleanup (e.g.defer allocator.free(buf)) that runs at scope exit. - Pluggable allocator interface: swap GeneralPurposeAllocator (with leak/double-free detection), ArenaAllocator, FixedBufferAllocator, or page_allocator without changing the code that uses them.
comptime: ordinary Zig code can run at compile time for generics, constant folding, and type generation - replacing macros, templates, and a preprocessor.- No hidden control flow: errors are values via error unions (
!T), there are no exceptions, andtry/catchmake every failure path explicit. - Optionals (
?T) make null an opt-in, checked state rather than a silent footgun. - World-class C interop:
@cImport/@cIncludeparse C headers directly with no bindings, and the bundledzig cccan compile and cross-compile C/C++.
History
Zig was created by Andrew Kelley, who first announced and committed the project publicly on 8 February 2016. Frustrated with the accidental complexity and hidden behavior of C and C++, Kelley set out to build a small, explicit language whose guiding philosophy is "if it isn't written, it doesn't happen": no hidden control flow, no hidden memory allocations, no preprocessor, and no macros.
The early compiler was bootstrapped in C++ on top of LLVM, and Zig quickly grew a reputation not just as a language but as a complete toolchain - zig cc can act as a drop-in C/C++ cross-compiler, and the project ships libc sources for many targets, making cross-compilation a one-flag affair. In 2020 the non-profit Zig Software Foundation (ZSF) was formed to fund full-time development, with Kelley as president.
Major language milestones followed roughly yearly through the 0.x series: the introduction of mature comptime metaprogramming, error unions (!T) with try/catch/errdefer, optionals (?T) to eliminate null-pointer surprises, and a long-running effort to remove LLVM as a hard dependency via Zig's own self-hosted backends and incremental compilation. As of the 0.16 (Beta) release in April 2026, Zig remains deliberately pre-1.0, with the team prioritizing correctness, the build system, and async/IO design over a premature stable label.