4 ms·
> D is closer to C++ than C, in my opinion. In terms of what the language allows you to do, yes. However, if you're a C programmer, you can pretty much just ke
by bachmeier 4y ago
> D is closer to C++ than C, in my opinion.
In terms of what the language allows you to do, yes. However, if you're a C programmer, you can pretty much just keep writing the same code you've always written (minus the preprocessor, thankfully). You can even compile C code with the D compiler and call those functions from your D code without doing anything further. That's definitely not the case with C++.
- moonchild 4y agoOh, come on now. I'm no C++ apologist, but you can do both of those things in C++ as well as in D.
- bachmeier 4y agoI meant you can't do things like compile C++ code directly into your D project.
- SilentLambda 4y agoD is not at all like C++. D is D. You only need to compare how C++ and D treat a class type, and you know straight away they are miles apart (I prefer C++ in this regard). D has a subset, and that subset is more like C - pretty much cause that subset is C. That can be interesting to use, since it's like C with modules. But don't be fooled. D is not like C++. I wish people would stop saying as such, cause it's not at all true.
- pjmlp 4y agoYou're right, in many areas it is more powerfull than C++23 is. As for classes, just pretend you are using structs in C++, and use structs in D.