Why is D unpopular?

Ali Çehreli acehreli at yahoo.com
Sat Apr 30 21:41:06 UTC 2022


On 4/30/22 11:15, Walter Bright wrote:

 > There is this paper from 2007:
 >
 > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf
 >
 > which proposes extending constant folding to functions, as long as those
 > functions are preceded by `constexpr` and consist of a single `return`
 > statement. Recursion is prohibited. Only literal types permitted.
 >
 > It couldn't even replace the use of template metaprogramming to compute
 > values.

Confusing that C++ proposal with D's CTFE makes me desperate. :( C++ is 
attempting to go one step beyond C preprocessor constants there. 
"Compile-time function execution" is a couple of decades beyond that 
simplicity.

Ali



More information about the Digitalmars-d mailing list