https://ziglang.org/documentation/master/#if
Also, Zig is so into expressions over statements that they plan to remove “function definition as statement”, which I think is awesome. In other words, conceptually function definition is a compile-time expression that creates the function.
Edit: here’s that Zig rfc:
https://github.com/ziglang/zig/issues/1717#
https://ziglang.org/documentation/master/#if
Also, Zig is so into expressions over statements that they plan to remove “function definition as statement”, which I think is awesome. In other words, conceptually function definition is a compile-time expression that creates the function.
Edit: here’s that Zig rfc:
https://github.com/ziglang/zig/issues/1717#