Newbie: The C / C++ Issue

Louis LeBlanc freebsd at
Tue Nov 11 19:10:46 PST 2003

On 11/11/03 09:26 PM, Matthew Emmerton sat at the `puter and typed:
> > Thanks for all of the great suggestions to my previous question!
> >
> > Yet, the responses have led me to another question. If C++ is
> > newer and more advanced than C, will it replace C? If so, should I
> > learn C++ and forget C?

C++ will NEVER replace C.  Not gonna happen.  C compiles to much more
efficient code in many cases because of the template constructs in
C++.  If you can avoid templates at all costs, you get very close, and
only a few cases will cause slower code in C++.  However, when it
comes to operating systems, I suspect it will be a long time before
people start using something besides C.

> You can't learn C++ without learning C first.  So I'd suggest you
> become intimiately familiar with C, and then move on to the advanced
> concepts and features that C++ provides once you want/need to use
> them.

I think it was established in the previous thread that this was
definitely NOT the case.  In fact, I learned C++ before I learned C.

That isn't to say you can become a real C++ expert without learning C,
so while I disagree with the statement that C is a prerequisite of
C++, I agree that becoming intimately familiar with C first is a very
good idea.  I found the underlying basics of C much easier to grasp
than C++, so learning C first might have made C++ easier.

In addition, regardless of the fact that C++ is not quite a superset
of C, there are still times when it will be worthwhile, usually for
the sake of efficiency, to bypass the C++ standard constructs and
build your own using more of a 'clean C' approach.

Louis LeBlanc               leblanc at
Fully Funded Hobbyist, KeySlapper Extrordinaire :)                     Ô¿Ô¬

Zymurgy's Law of Volunteer Labor:
  People are always available for work in the past tense.

More information about the freebsd-questions mailing list