News for hackers. Stuff that matters.
Re:Compile-Time Sort in D by MauranKilom on Saturday February 12, 2022 @08:05PM (#30318046)
Obligatory C++ comparison: C++ has constexpr since C++11 and constinit since C++20. They mean more or less the same when applied to variables ("must be evaluated at compile-time"), but constinit does not imply constness.
Re:Compile-Time Sort in D by mhh__ on Saturday February 12, 2022 @09:41PM (#30318605)
D evaluates until it hits something it can't manipulate at compile time whereas constexpr requires things to be annotated as such, so the difference is slightly more subtle.
Re:Compile-Time Sort in D by pjmlp on Sunday February 13, 2022 @02:24AM (#30319956)
While true, Circle C++ compiler works as D does, although that is not standard, thus D does win in expressiveness.