Why is D unpopular?

Siarhei Siamashka siarhei.siamashka at gmail.com
Fri May 6 06:57:52 UTC 2022


On Friday, 6 May 2022 at 06:18:08 UTC, Patrick Schluter wrote:
> That's the point. It reduces build complexity in a disruptive 
> way.

My point is that CTFE actually increases the complexity and moves 
it somewhere else in a somewhat obscure way. It's one of the 
zillions of extra features that make the language spec bloated 
and difficult to learn.

>> 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.
>
> You have to include your build tool invocation and development 
> time

Yes and no. What really matters is the transparency and 
simplicity.

For example, I can have a tool which calculates Pi number with 
high precision. Then I bundle this tool as a part of the project 
and simply use the computed constant in the source code. This 
extra tool is very visible in the project structure and there's 
nothing obscure about it. But with the CTFE approach, somebody 
may be tempted to do the expensive Pi constant computation every 
time at the compilation time. And this may be hidden somewhere 
deep in the source code in a much less visible way. Looks like 
such feature makes it too easy to shoot yourself in the foot.

>> 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.
>
> We are now deep in "whataboutism-fallacy" territory here, aka 
> as clutching at straws to win he last word in a debate. The 
> same security issue (I would even say, worse) with external 
> build tools generating code.

Uhm? Sorry? Are you saying that it's me who is clutching at 
straws? This whole thread is about what makes D language 
unpopular. People seem to be clutching at straws to claim that 
the D language is great, but somehow the rest of the world just 
doesn't get it.

The setup with external build tools is surely much easier to 
understand and review.



More information about the Digitalmars-d mailing list