tooling quality and some random rant

bearophile bearophileHUGS at lycos.com
Sun Feb 13 05:08:42 PST 2011


Nick Sabalausky:

> Paulo Pinto:
> > Why C and not directly D?
> 
> That's jumping to conclusions. C is little more than a high-level assembler. 
> That's why it's a reasonable first step up from Asm. Once it's in C and 
> cleaned up, that's the time for it to move on to Dù

Paulo Pinto has asked a fair question. The answer is that D is not a perfect system language. If you need to write code for an Arduino (a small CPU), for 16 bit CPUs in general, if you want to convert something from asm like that linker (Walter has said that later it's easy to convert the C linker to D), and in several other situations, C language is better. Programs compiled with the a C compiler are generally smaller than the one compiled with DMD, there are simple ways to produce binaries of 4000 bytes with C. This is not a failure of D, D is designed for larger 32 bit CPUs, for systems that have a heap memory (in D there are ways to avoid heap allocations and to remove the GC, but doing it in C is more natural. I don't know how produce DMD binaries with DMD that don't use the GCC and don't include it, this problem is missing in C).

Bye,
bearophile


More information about the Digitalmars-d mailing list