Re: C or C++



Anthony Irwin wrote:
Hi All,

I am starting to learn C and am wondering if C++ may be a better choice? The purpose is to do free software development and eventually contribute to existing projects.

I believe that a lot of gnome stuff is c and kde stuff tends to be c++ is that correct?

what would other people out their recommend. I realize there are lots of different opinions on this but I was just interest to see third party thoughts.

As you can see from the replies so far, the discordance of opinions can
not be higher...

Having *taught* both C and C++ for many years (as well as used both
for development), it is my opinion that learning C first is the worst
possible idea.

C++ is a complex language, yes, but unlike C (and unlike Java), it has
the virtue that if you want to do simple things, you can do them very
simply --- that's the biggest plus when talking about learning to
program. You concentrate on the simple stuff first, putting aside
the deeper complexities of the language (which are valuable when you
want to start doing more complex things).

With C, the novice programmer is treated as harshly as possible. Plus,
it makes it incredibly hard to learn C++ *well* afterwards --- the
prorgammer creates many extremely-hard-to-break habits that, given
the alternative C++ techniques that are available, make them bad
practices.

You'll probably want to learn and master *both* --- in which case I
strongly recommend that you learn C++, then C; in the old days, it
was considered common sense that you had to learn C as a pre-requisite
to learn C++, and that, those many years of using that approach, is
precisely why we know today that it is a very *very* bad idea.

Carlos
--
.