Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

D would make a good case study to look at why some technologies find widespread use whereas others don't. I don't understand why it never took over from C++.


D's standard library uses garbage collection.


So do Java, C#, Python, Ruby, PHP, Javascript, and virtually everything else and they are very heavily used. Garbage collection is a smashing success in the real world and D made the right decision to follow that success.

Of course, it is also true that much of the standard library doesn't actually use it... but these objections are never actually about facts.


None of those languages you listed are for systems programming, which is the one niche you need to excel at if you want to replace C and C++. People who care about that stuff tend to care a lot about managing memory.


Ds GC can be turned off to do systems programming.


How much of the standard library can you use in that mode?


> So do Java, C#, Python, Ruby, PHP, Javascript, and virtually everything else and they are very heavily used.

That's the point. There are already many popular languages with GC. Why would people switch from C++ (this was the original question) to D instead of one of those much more popular languages that you mentioned?


C++ was deliberately backwards compatible with C. D was not backwards compatible with C or C++.


D uses C calling conventions and struct layout so it's pretty trivial to call D code from D or vicecersa and link together, the only step added over C++ is writing an include file with the declarations of the stuff you want to call.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: