Home Pages Articles


Thomas - 2022-02-21

Zig is my new favorite language

Zig looks like this:


Zig also has things like this:


In this case the booleans are computed at compile time, and as a result so are the if statements inside the exit function. This is not done by an optimizer, but as a result of the compile-time semantics of the language.

This magically turns Zig into an extremely powerful competitor to C-like lowlevel languages that rely on preprocessors to make compile-time decisions.