|
|
|
|
|
by deaddodo
352 days ago
|
|
Most C and C++ developers take umbrage with combining them. Since C++11, and especially C++17, the languages have diverged significantly. C is still largely compatible (outside of things like uncasted malloc) since the rules are still largely valid in C++; but both have gained fairly substantial incompatibilities to each other. Writing a pure C++ application today will look nothing like a modern C app. RAII, iterators, templates, object encapsulation, smart pointers, data ownership, etc are entrenched in C++; while C is still raw pointers, no generics (no _Generic doesn’t count), procedural, void* casting, manual malloc/free, etc. I code in both, and enjoy each (generally for different use cases), but certainly they are significantly differing experiences. |
|
It is like adopting Typescript, but the only thing they do is renaming the file extension for better VScode analysis.
Another one is C++ "libraries" that are plain C with extern "C" blocks.