So strange, because this idea has been one of the most exciting parts of C++ for the last decade - they call it constexpr
but it's very similar.
Zig’s idea is potentially more practical, though.
C++ actually has three separate sorts of code running at compile time — the C macro processor, which modern C++ has made redundant; the template metaprogramming language; and, called from that, constexpr
C++ expressions.
It's a drag, and I'm fairly good at it. The template metaprogramming language is gnarly and weird; its error messages are notoriously long and hard to decipher, and it is hard to write completely correct code.
Zig on the other hand has just one language that runs at compile time — Zig. It isn't quite clear to me that you can use all of Zig’s features at compile time, but still, it's a much more sensible way to go.
Thanks for writing! I'll keep an eye on Zig.