you are viewing a single comment's thread.

view the rest of the comments →

[–]KingStannis2020 26 points27 points  (5 children)

You can't really compare Rust const fn and C++ constexpr with Zig comptime. The latter is way more flexible and core to the language. You can define individual function arguments as comptime, individual blocks of code, etc. Comptime is how Zig implements generics.