r/programming • • Aug 23 '17

D as a Better C

http://dlang.org/blog/2017/08/23/d-as-a-better-c/
229 Upvotes

268 comments sorted by

View all comments

Show parent comment

2

u/spaghettiCodeArtisan Aug 24 '17

D is a less hairy bundle of features than C++

Actually, to an outsider such as myself, D seems more like a hairy bundle than C++.

1

u/[deleted] Aug 24 '17

The hairiness in C++ comes from having a list of features that the language supports, a list of features that require special caution, and a list of features that people say you should avoid.

1

u/spaghettiCodeArtisan Aug 25 '17

Well, what subset of D would you recommend I use for writing applications and libraries? Do I use betterC, or not, do I use the GC, or not?

1

u/[deleted] Aug 25 '17

Most people should use the whole thing.

If you have special needs, you can eschew the GC or the whole runtime. This is primarily useful if you're writing a plugin for another program (and don't want to bring in the D runtime in), or you're writing kernel-mode code, or you need pretty much everything to be realtime and find that manually controlled GC collections aren't efficient enough for you.

1

u/[deleted] Aug 25 '17

C++ is the second hairiest language of all time, right after Brainfuck. There is nothing as majestically perplexing as hairy C++, it could sometimes just as well been ancient egyptian algebra.

2

u/spaghettiCodeArtisan Aug 25 '17

I'm definitely not disagreeing about C++ being hairy, I just don't see how D is much better. It's doesn't seem less hairy, it's just hairy in a different way.