Comparing reflection capabilities of C++, Zig and C3
Summary
The article compares compile-time reflection across C++, Zig, and C3, focusing on enum-to-string conversion, struct introspection, and compile-time validation attributes. It argues that all three support compile-time reflection, but differ in ergonomics: C++ uses templates, Zig relies on comptime blocks, and C3 uses macros and a specialized syntax to execute at compile time. The piece also includes code examples and concludes that C3 shows promise for readable, stable compile-time features, with links to further resources.