| ▲ | flohofwoe 2 hours ago | |
It's not just about writing imperative code that runs at compile time, the actual interesting comptime feature in Zig is that "types are comptime values", e.g. you can inspect types and build new types with regular (comptime) code. This is very different from the template/trait systems in C++ and Rust. What Zig's comptime system is missing is the ability to build functions bodies at comptime (e.g. some sort of comptime AST builder). | ||
| ▲ | zozbot234 2 hours ago | parent [-] | |
"You can inspect types and build new types at compile time" is a key affordance of dependently typed languages. | ||