Hacker News new | ask | show | jobs
by petre 1656 days ago
It's basically C++ done right. Much more easy to learn than C or C++ and be productive in it from day one. It won't become boring or annoying like Go, because the language is loaded with features and there's always something new to learn. It's garbage collected, so you don't need to worry too much abot allocating and freeing memory, but it's helpful to have an insight and understand how it works (there are articles about it on dlang.org). Of course, one could also disable it. Of course Go has many more good quality libraries for just about anything you could dream of, but D interfaces very well with existing C and C++ libraries.
1 comments

I'm a C guy and have played around with C++ back in the day, but have come to despise the language, with all of its increasing complexity, warts, design flaws, and footguns. I'm highly suspicious of Rust and Go as well. I prefer the C way of doing things, with no garbage collector, though I do tire sometimes of all the extra grunt work that goes into implementing anything in C. Looks like D has a lot of features geared toward making development faster, without loading up with too much complexity like C++. Just read about the 'better C' mode which sounds interesting. I like that it's made to integrate seamlessly with C libraries. Are there any good examples of larger programs or libs written in D you could point me towards, so I can learn by example the 'D way' of doing things?
I'm a D newbie myself. Existing larger programs usually use advanced language functionality (like pure functions, generics, templates), which is a bit overhelming when learning a new programming language. You can use this resources page and pick up whatever interests you:

https://github.com/dlang-community/awesome-d

If you insist dissecting existing code, the Hunt library is well commented and seems more approachable. It uses OOP and some templates.

Cool, I'll check that out. Thanks for the tip.
I wouldn't bother with betterC. Use the language as it's intended to be used first.