Hacker News new | ask | show | jobs
by masklinn 1118 days ago
You mean, like https://doc.rust-lang.org/reference/const_eval.html?
2 comments

Not even close
TIL compile time evaluation without macros is not compile time evaluation without macros. Thank you for the insight.
That’s nothing compared to what Constexpr and other c++ features let you do. The conditional compilation example for instance.
Zig has shown the true power of constexpr in being able to provide a powerful construct that generalizes well.

After sum types (and pattern matching), constexpr is the next great language feature that will be everywhere soon.

I would love for Rust to fully adopt constexpr.