Trust about D programming.

Sergei Nosov sergei.nosov at gmail.com
Tue Jan 22 03:41:13 PST 2013


On Tuesday, 22 January 2013 at 11:17:32 UTC, MMj wrote:
> On Tuesday, 22 January 2013 at 10:45:27 UTC, deadalnix wrote:
>> On Tuesday, 22 January 2013 at 09:27:22 UTC, MMj wrote:
>>> Hello Folks.
>>> How are you?
>>> Excuse me, I need a trust about D programming and C, In your 
>>> opinion D can be a replace for C?
>>> Why a user should use D?
>>> Please let me know your opinion.
>>>
>>> Thank you.
>>> Cheers.
>>
>> It really depend on what you try to achieve. But in many case 
>> it is a viable alternative. In other, things need to be ironed 
>> out.
>
> I saw D wiki and understand some goals about but Can you tell 
> me why you choose D and not C?

 From my perspective, D cannot replace C in sense "you can throw C 
away". Well, maybe it could theoretically, but not practically.

But the trend is C is becoming more and more a high-level 
assembler. Things like mapping to a register, no hidden costs, 
"you can basically see the assembler when programming in C".

So programming OS kernels and stuff is very practical in C.

I guess C++ could replace C in a sense "you can throw C away" in 
foreseeable future. Because, essentially C++ is a better C than 
C. It might go this way or not, but the potential is good enough.

Things in D are kind of upside down. It places itself close to 
C++, but if C++ looks towards C from that position, D looks 
towards Java/C#. It makes it very appealing for "productive" (in 
Java sense) and "efficient" (in C sense) systems programming. 
E.g. right know, I think D is very compelling for writing a 
server (vibe.d would be a good example).

But for embedded programming I don't think D is a good practical 
choice. C and C++ shines there and I don't think things are 
changing soon.


More information about the Digitalmars-d mailing list