Help me decide D or C

ryuo ryuo at ryuo.xyz
Fri Aug 2 05:26:34 UTC 2019


I have spent the better part of 10 years with C, and it was my 
first serious language. I would say go with D if you just want to 
work on higher level projects and forego the low level details to 
an extent. C is very low level and very unforgiving. The 
inexperienced will run into things like segmentation faults or 
other memory errors until they understand how pointers and memory 
works.

Also, while D has fewer available resources than C does, C is 
also an entirely different beast. The C standard library is very 
limited, only providing some very basic functionality. Advanced 
data structure implementations are not provided by it so you 
would be forced to either write your own or use a suitable third 
party library. Contrast this with C++ or D where such things are 
likely already provided by their standard libraries.

In short, C is generally used to implement a foundation of sorts 
for higher level programs or other ventures where low level 
control is a requirement. For example, it is common to implement 
general purpose libraries for things like compression or 
encryption in C for performance reasons and also for reusable 
code. Libraries written in C can generally be used by any 
language that runs natively, usually through a binding or a 
translation of the library API.



More information about the Digitalmars-d-learn mailing list