Y
Hacker News
new
|
ask
|
show
|
jobs
by
swiftcoder
2218 days ago
Oh good. We're reaching C++ levels of template metaprogramming.
1 comments
jcelerier
2218 days ago
C++ allows expressing that more concisely though :p
https://twitter.com/Cor3ntin/status/1264600096869691392
link
staticassertion
2218 days ago
That's because it's using constexpr. The equivalent in Rust would be const fn. This is using Rust traits.
The goal isn't to be concise, I think the goal is literally to just do it in the trait system
link