DEV Community

JavaCode7
JavaCode7

Posted on • Edited on

D v C++

D was created as an alternative to C++. It supposedly "fixed" all the errors in C++. But did it really? Today we find out in D v C++.

Credits 😊

Thanks to @pranavbaburaj for some of these points.

C++

C++. By far one of the most well known programming languages. One of its achievements was adding OOP to C. Let's look at some strong (and weak) points:

  • ✔  Fast
  • ✔  Compiled
  • ✔  Game engine support
  • ✔  OpenGL support
  • ✔  Well known
  • ❌ Somewhat complicated

D

D was made to improve C++ but did it do a good job?

  • ✔  Compiled
  • ✔  OpenGL support
  • ❌ No game engine support
  • ❌ Not very well known
  • ✔  Simple

Well, all of this evidence gives a clear winner. C++. If you disagree however, go comment down below with your reasoning! I would love to hear what you think.

Top comments (5)

Collapse
 
adevore profile image
Aaron DeVore

I remember trying to learn D. While it's simpler than C++, I would not call it a simple language. It also doesn't have great learning resources to explain how the language fits together. There's a language reference, but it's not really that good as a learning resource.

D has just never managed to get a critical mass of growth. Every once in a while it will see a brief surge in one of the various language indices, but it never really goes beyond that. If it hasn't happened in the 20 years since D was first created, I really don't see it happening now.

I've heard various explanation for why this happened. The most compelling is that D is generally better than C++, but not better enough to convince people to make an arduous switch. From what I understand, it's also difficult to use in some applications of C/C++ because of its GC. Hypothetically it can be used without the GC, but the library support just isn't there. I think that's why Rust has been taking off recently. It provides a cleaner language without needing to go out of your way to avoid GC. The ecosystem also has better support for stripped down versions of the language via no_std, which is lacking in D.

Collapse
 
freakcdev297 profile image
FreakCdev

More D "good points":

  • Adding a functional library
  • A bit safer

That's all I think, D to me is kinda crappy, it doesn't really solve any problems that C++ has, it has an extremely small community which makes it hard to have any 3rd party libraries for frameworks at all. It's a good language, but pretty useless in my opinion.

P/S: I am not a D expert, I have just tried D for a very short time so I might have said something wrong.

Collapse
 
tricky4747 profile image
Tricky

Cool Read!

Collapse
 
javacode7 profile image
JavaCode7

Thanks 😊.

Collapse
 
lorendb profile image
LorenDB

Games and game engines are not everything. There are a lot of other areas where D could have an opportunity to shine.