Andrew Kelley didn't set out to write a programming language. He was building a digital audio workstation and kept running into walls: JavaScript couldn't touch the hardware he needed, Go's garbage collector paused at exactly the wrong moments for real-time audio, pre-1.0 Rust's borrow checker fought him for weeks over font rendering, and C just kept corrupting memory. He quit his job in 2018 and wrote Zig instead, according to a JetBrains interview recapped on daily.dev. That origin story matters, because every one of those frustrations points at the same underlying complaint: something was happening behind his back, and he couldn't see it, predict it, or control it.
Zig's answer to that complaint is a design slogan you'll see in nearly every introduction to the language: no hidden control flow, no hidden memory allocation, no preprocessor, no macros. A Rust developer trying Zig for a day summarized it as Zig's core selling point, contrasting it directly with how much implicit machinery sits underneath Rust and C++ code, per Michi's blog review. The mechanism that makes "no hidden anything" actually livable, rather than just an austere restriction, is comptime.
Compile-Time Execution as the Replacement for Macros
Most languages that ban hidden control flow end up paying for it in boilerplate, or they cheat and bring back a preprocessor through the back door. Zig's move is to let you write ordinary Zig code that the compiler runs during compilation instead of giving you a separate macro language. A tutorial series on extending Lua with Zig walks through this directly: constants like const std = @import("std") are evaluated at compile time, and the compiler eagerly executes comptime code except for regular function calls, which you can force into compile-time evaluation with an explicit comptime keyword, according to LavX News. The same piece notes something that trips up newcomers: adding comptime in a context where it's already implied is itself a compile error. Zig doesn't want you declaring intent it can already infer — it wants the boundary between "runs now" and "runs later" to be exact, not fuzzy.
The payoff shows up in ordinary-looking code that would need generics, macros, or reflection in other languages. A Go-to-Zig comparison points to std.debug.print, whose signature takes a comptime format string and anytype arguments — the compiler checks your arguments against the format string at compile time and generates matching code, with no runtime format-parsing step and no macro layer hiding what's happening, as described in a DEV Community write-up. That's the trick: instead of a separate templating or macro system with its own syntax and its own rules, Zig reuses the host language itself as its own metaprogramming layer. You're never learning a second language to generate code in the first one.
The Allocator Pattern Shows the Same Philosophy Applied to Memory
Comptime doesn't exist in isolation — it's one expression of a broader Zig commitment that nothing happens without your explicit say-so. The clearest parallel is memory allocation. Where Go's garbage collector owns an object's lifetime invisibly, Zig routes every allocation through an explicit Allocator you pass around like any other argument, which means you can swap an arena allocator into a request handler or a fixed-buffer allocator into embedded code without touching your business logic, per the same DEV Community piece. It's tedious in the way that writing your own malloc/free calls is tedious, until you realize the tedium is the whole point: nothing allocates that you didn't ask to allocate, and nothing executes at compile time that you didn't explicitly compute.
Zig's own community has started articulating this as a stance on systems programming generally, not just a language quirk. Loris Cro, writing about his Zigtoberfest talk, frames the deeper skill Zig is trying to teach as modeling a problem as the sequence of operations the target system actually offers, rather than as a stack of framework dependencies that hide what's really happening underneath, in his blog post. Comptime is the tool that lets you build abstractions without paying for that hiding — you get the convenience of generic code and compile-time computation, but every bit of it is still Zig you could have written by hand.
What to Watch
Zig hasn't hit 1.0, and Kelley has said repeatedly that it ships when the team can credibly promise stability rather than on a calendar date. The comptime model itself has been stable for years, but the build system and package manager around it are still shifting underneath users — worth watching if you're the kind of programmer who wants the "no hidden control flow" promise to extend to the tooling, not just the language core.
