language | D | C++ | C |
---|---|---|---|
domain | application, system | application, system | application, system |
latest standard | D2 | ISO C11, C14, (C17) | ISO C11 |
standard library | phobos | e.g. GNU libstdc++ | e.g. GNU libc |
design by contract | builtin | framework (e.g. nana, contract_light), compiler Digital Mars (owner is creator of D) | framework (e.g. nana, contract_light), compiler Digital Mars (owner is creator of D) |
syntax | C-like (similar to Java, easier, more readable and less error prone) | C++ | C |
unittesting | builtin support or framework | framework (e.g. gtest, catch) | framework (e.g. see C++ framework) |
mocking | framework (e.g. DMock-revised) | framework (e.g. FakeIt) | framework (e.g. see C++ framework) |
typing | static | static | static |
language binding | (limited C++ application binary interface compatibility), C application binary interface | C | - |
programming paradigms | imperative, structured, object oriented, generic, functional | imperative, structured, procedural, functional, OO, | imperative, structured, procedural |
memory management | garbage collection (automatic) with possibility for allocator/deallocator overriding (dynamic/manual), memory safe SafeD subset which avoids memory curruption at all | dynamic/manual, automatic with framework (e.g. bdwgc | dynamic/manual, automatic with framework (e.g. bdwgc) |
Last active
July 3, 2017 19:59
-
-
Save fkromer/15e72e35ecccdd4d0b987e2626b8e2e8 to your computer and use it in GitHub Desktop.
Comparison table: D, C++, C.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment