Why is D unpopular?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Mon May 2 07:35:05 UTC 2022


On Sunday, 1 May 2022 at 21:00:23 UTC, Ali Çehreli wrote:
> I think the authors desperately held on to one idea that they 
> could prove to be correct. One truth does not make all their 
> points correct.

I believe the chose "if constexpr" because it doesn't 
significantly alter language semantics and compiler internals. 
C++ already had #ifdef, so the I personally don't find a need for 
more than "if constexpr". The concept of "if constexpr" also has 
a valuable advantage when writing a library: the compiler can 
type check all branches.

The primary advantage, IMHO, for D to have "static if" rather 
than "if constexpr" is that a static for loop becomes trivial to 
implement. So this is an advantage the D is likely to retain.




More information about the Digitalmars-d mailing list