Why is D unpopular?

Siarhei Siamashka siarhei.siamashka at gmail.com
Fri May 6 05:58:37 UTC 2022


On Thursday, 5 May 2022 at 23:06:26 UTC, Walter Bright wrote:
> It was D that changed that perception. Suddenly, native 
> languages started implementing CTFE.

Is CTFE really that useful? Generating code as a part of the 
build process has been in use since a very long time ago. Any 
programming languages (perl, python, php, ...) or tools (bison, 
flex, re2c, ...) could be used for this. Yes, the build process 
becomes a bit more complicated, because you suddenly have more 
build dependencies and more complicated build scripts or 
makefiles. Still it's not a rocket science. Everything is pretty 
easy to use and understand.

CTFE allows to to cut some corners and move this complexity into 
a compiler. The upside is that we don't need advanced build 
scripts. But the downside is potentially slower compilation 
(especially with the interpreting approach), which is also too 
obscure and hard to notice and fix. Additionally, can CTFE be 
used to sniff some passwords from my system and embed them into a 
compiled binary? Now we got some security concerns on top of that.

As for the other languages implementing CTFE, my understanding is 
that compiler people just generally have to do something to keep 
the ball rolling and have themselves entertained and employed ;-) 
The features themselves may be useful or they may be just 
gimmicks. Only time will tell.

At the end of the day, D language happens to be unpopular. CTFE 
doesn't look like a panacea.


More information about the Digitalmars-d mailing list