[nSLUG] Re: C++ beginner references

Steven R. Baker srbaker at pobox.com
Sat Oct 18 14:18:05 ADT 2003


        Personally, I would suggest that, as a novice, you start with
        C, not C++.  Depending on your learning style, you can read
        Kernighan & Ritchie in a few days or even (say, up to Ch. 6)
        straight through in a sitting.  C is simpler and less fraught
        with ambiguities and gotchas than C++.  What you learn from
        K&R will mostly be portable to C++ if/when you go on to that
        later.  The man pages for all the basic C functions will be
        available on your Linux box.

Bullshit.  If you want to learn C++, you have to unlearn most of what
you learned in C anyways, and break all of your bad habits.  Thinking
in this way causes people to think C++ is just a superset of C.
That's why the language is so badly abused.

            Object oriented programming is great -- some problems seem
            just to solve themselves in the OO context that are
            confusing without it -- but C++ isn't the easiest venue in
            which to learn about it, especially if you don't
            understand the concepts of C structs and functions first.

I agree here.  If you want to learn OO, go with an esier language like
Python.  The Python tutorial is awesome.  Anyone that reads at better
than a third grade level can complete it in 45 minutes or less.

            C++ was developed chiefly for the benefit of biz, not
            hacking.  The notion was that you could lock up your
            proprietary code in "objects" that would be available for
            use -- i.e. marketable -- with a well defined programming
            interface without revealing your valuable source code.  At
            the expense of lots of somewhat hairy overhead for the
            hackers. [1]

Again, bullshit.  C++ was developed because C was popular, and OO was
becoming more so.  OO has nothing to do with locking your code into
proprietary objets any more than shared libraries have to do with
locking up your proprietary code in easy to manage bite-sized chunks.
It has absolutely nothing to do with memory management or code size.

The problem C++ is that most C++ compilers suck.  That's where the
hairy overhead comes from.

Vikram, if you want to learn OO programming, go with an easier
language like Python, as I said above.  If you want to learn
programming, again, go with an easier language.  If you honestly want
to learn C++ specifically, then don't let anyone tell you otherwise.

That said, Teach Yourself ANSI C++ in 21 Days by Jesse Liberty (and a
few others, perhaps) is a great book.  If you lack a social life, you
can get through it in one evening (as I did).

Also, the Stroustrup book is an absolute necessity if you're going to
use C++ for anything serious.

-Steven

-- 




More information about the nSLUG mailing list