Why is D unpopular?

Walter Bright newshound2 at digitalmars.com
Fri May 13 18:17:06 UTC 2022


On 5/13/2022 3:37 AM, IGotD- wrote:
> Thank you and you are saying what I thought from the beginning when I read about 
> import C. Import C is an answer to a question we never asked.

htod, dstep and dpp suggest otherwise.


> Since we don't have a preprocessor

We do:

https://github.com/DigitalMars/dmpp

> and if it ever will exist it will be crippled and unusable.

??

> Basically we have to run a .h file through GCC/Clang in order to run the 
> preprocessor,

It gets run through cpp at the moment, not the C compiler.

> then what is the point of import C if we have to use an external 
> tool to begin with.

D has always required the "associated C compiler" if only because that's where 
the C standard library it links with, and the external linker, comes from.


> Then we can just use a stand alone tool to convert C .h 
> files to D which is likely to work much better as well.

We already have that tool: htod, dstep and dpp. Ironically, dpp relies on clang.

> Also external tools also 
> opens up the possibility for C++ and other languages translation as well, 
> something that will never happen with import C.

C is how disparate languages communicate with each other. It's the lingua franca 
of programming languages.


> Now we are several months into import C and Walther claimed it was easy to 
> implement from the beginning which is obviously not true at all. If you look at 
> the bug list, it is just riddled with import C bugs and will be.

Not really. Every compiler has bugs in it.


> Just remove import C, it is pointless and rely on external translation tools 
> instead.

They're good tools, but don't quite get us there.


More information about the Digitalmars-d mailing list