Re:Idioms for the D Programming Language
by p0nce on Friday February 12, 2021 @06:08AM
(#26112401)
C++ doesn't implement the D features right.
For example C++20 has constexpr, consteval, constinit, for a less powerful equivalent of D's CTFE.
D use no syntax for this. Things are evaluated in CTFE when they can. The rules are simple, and you can ignore them for the first few years. It's because CTFE is considered a normal thing in D.
For example C++20 has constexpr, consteval, constinit, for a less powerful equivalent of D's CTFE.
D use no syntax for this. Things are evaluated in CTFE when they can. The rules are simple, and you can ignore them for the first few years. It's because CTFE is considered a normal thing in D.