Linked by Roberto J. Dohnert on Wed 28th Jul 2004 17:23 UTC
General Development Most of us that work in the IT industry have been around for a long time. We started out in our parents basement writing code in some BASIC environment, ussually Commodore BASIC or QBASIC. Do you remember how thrilling it was? Your first program and it was something extremely basic but the point was it worked. Some of us got hooked right away and kept trying to solve problems and added more and more pushing the capabilities of whatever language we used. As we got older the environments progressed and the programming tools progressed and got more complicated.
Permalink for comment
To read all comments associated with this story, please click here.
RE: C++ can be for hobbyists if ...
by JeffS on Wed 28th Jul 2004 20:20 UTC

@GPSnoopy -

You make an excellent point about using the standard library in C++. It makes programming C++ soooo much easier, and can be as easy as Java, VB, Python, etc.

The Standard Template Library, specifically, is a true work of programming art, as far as libraries go. Many of the brightest minds in the programming discipline (Bjarne Stroustrup himself included) spent years perfecting the STL. But then people turn around and not use it, constantily reinventing the wheel, using lots of pointers, copy constructors, direct memory management, etc. and falling into the usual potential pitfalls of C programming.

The problem is that people usually learn C++ with a bottom-up approach, first learning the low level stuff, then moving up to objects and templates, etc (and that's the fault of most C++ books and classes - learn C in C++ first, then learn objects and templates and the library).

What should be done is people should be taught with a top-down approach, learning the STL right off the bat, along with basic syntax. Then the new learner doesn't have to worry about pointers and/or arrays (along with direct memory allocation) when using strings. Or the new learner doesn't have to worry about array bounds issues, by using the Vector template. There are many other examples of this higher level abstraction (without loosing much in efficiency and even gaining efficiency is some cases) as well.

There is one book out there that does this top-down approach: "Accelerated C++". It teaches the STL immediately, putting it into a context of solving common, simple problems, seamlessly integrating it into "Hello World" style learning examples. This book doesn't even get into pointers until the second half of the book. Frankly, anyone who says C++ is "too hard", or anyone who codes with C++ and runs into common pitfalls, should read this book.

Stroustrup's book, also, is a great example of taking the right approach, only on a more advanced, in depth, ultimate language definition level.

These two books combined put my C++ understanding and proficiency onto a much higher plain, to the point where I'm completely comfortable with C++ and making it my favorite language (when I used to think it was too hard and bloated). I've learned that C++ can be as low level and powerful and efficient as you want, or it can be as high level and productive as you want, without these two categories being mutually exclusive.

People who bash C++ typially just haven't learned it in the best possible way.