Re: Why do people still use C instead of C++ ?
Daniel Pitts wrote:
Bo Persson wrote:
Ian Collins wrote:
pgadmin wrote:
At the kernel level, there is a difference between C and C++.
And that difference is performance. At the kernel level,
each indirection is a memory reference, which is much slower
than register access.
The penalty in performance is probably around 50%, AT LEAST,
compared to pure C.
Care to prove that?
Sure.
In C++ everything is a class using multiple inheritance and dynamic
allocation. All funtions are virtual, always.
In C everything is an int, allocated to a register. Much more
efficient! :-)
Bo Persson
That is hardly a proof of anything. Especially since there are no
references or explanation of how you came to that conclusion.
Unless... Are you're being facetious and I missed it?
Probably. :-)
That was my impression of why some people don't like C++, including
Linus Torvalds.
The argument seems to be that it is easier to write bad code in C++
than in C. Some of us argue that it is also easier to write good code
in C++.
Bo Persson