4 ms·
If C++ can be explained adequately with simple C code, why use C++ in the first place?
by jpr 16y ago
If C++ can be explained adequately with simple C code, why use C++ in the first place?
- roel_v 16y agoC++ cannot be explained fully with simple and safe C code. For example, theoretically one could implement the most basic usage of templates with macros; it would however not be easy to work with (error message in the wrong places) and it would still not emulate e.g. template specialization.
- danssig 16y agoBetter type safety is possible in C++ than in C.
- mahmud 16y agoSome manual C code can adequately explain what C++ does automatically. The difference is cost; you have to link against C code, for some platforms, what C++ provides for free on all platforms.