3 ms·
It's fair, in a sense that it's possible to implement cost-free abstractions in C++. However, you have to know what you're doing: some of the C++ abstraction m
by Ace17 10y ago
It's fair, in a sense that it's possible to implement cost-free abstractions in C++.
However, you have to know what you're doing: some of the C++ abstraction mechanisms will cause the compiler to insert executable code at places a C programmer might find unexpected (e.g constructor and destructor calls).
In one word, you still have to learn how to use the language properly, and it's difficult - but definitely worth it.
Interestingly enough, some of the abstraction mechanisms provided by C++ (templates, inheritancy, polymorphism, ...) can also be partially simulated in C, with a lot of effort (the Linux kernel makes a heavy use of them (macro-powered)).
It's just that C++ makes those things easy to do ... allowing your incompetent teammates to easily shoot you in the foot.