Re: C or C++



Rainer Weikusat wrote:

It's like trying to teach a toddler that is beginning to utter some
words about semantics, verbs and nouns and conjugations and how what
really is important is expressing the idea and organizing the
sentences and not the actual words being uttered in a particular
language (English, French, Spanish, etc.)

That's a really bad analogy, because you are teaching to grown-ups (or
at least 'mostly grown-ups') and not small children.

Errrr, sorry, but I think you're misinterpreting the meaning of the
term "analogy" --- it is a very accurate analogy, because I was
emphasizing the fact that for someone without *maturity* to see and
understand the bigger picture, it's no use complicate things with
an excessive amount of information and notions. It does not matter
that the beginner programmer is an adult --- they're like innocent
clueless children when you try to make them think of programming.

The little one+ year old has no maturity to understand the abstract
notion of *communicating ideas* and the fact that the actual words
simply happen to be arbitrary utterances, and that the same ideas
and the same communication process can happen exactly the same even
if the syntax and actual words are entirely different.

Same thing for a 6 (or 7?) year old learning their basic math;
learning to add, multiply, etc. --- there's no point in trying to
teach them about the mathematical properties of numbers, and use
binary and hexadecimal notation to illustrate the principle that
adding numbers is nothing other than applying the fundamental
principles of the operations .... etc. etc. etc.

Again --- an *analogy*, not another instance of the *exact* same
situation, and exact from any conceivable point of view.

In this respect, the answer is very easy: Learn C, it is a lot simpler

Not as a "beginner's" programming language. Once you get maturity
and experience, it is indeed a simpler language (from a certain
point of view). But for a beginner, the amount of details that
are the entire responsibility of the programmer is what makes it
unsuitable as a language to teach programming.

Again, I'm not speaking based on my language preference --- the
above statement is based on my personal experience *teaching*
both C and C++ to both beginners and non-beginners --- for non-
beginners, the subtleties in C are, at worst, annoying because
they're already used to other languages in which the programmer
doesn't need to care about so many things... But that's about
it --- they really have no problem dealing with all the new
stuff; for *beginner programmers*, the experience of C is a
true horror story.

C++ has a quite unique virtue, from the didactic point of view:
even though it is an extremely complex language, the complexity
is "optional", and it goes (in general) with the complexity of
the task that you're solving --- IOW, if you simply want a
program that receives two numbers from the user and prints
them, you do that extremely simply. That is not the case with
C (or with Java, for that matter!!)

My point keeps being that, if for whatever reason, logical or not,
the objective is to learn *both* C and C++, I am convinced, after
more than a decade of experience teaching both languages to
beginners and to non-beginners, that the best approach is to
learn C++ first, then learn C.

You still haven't offered a reason for this conviction of yours,
beyond that people learning C will have to learn C and not C++.

Funny how you all keep ignoring the part that clearly states
"based on more than a decade of experience teaching both C and
C++" --- and also all the other reasons, which I repeat in this
message (see the several paragraphs above).

Carlos
--
.



Relevant Pages

  • Re: Boxing and Unboxing ??
    ... It also increases language complexity, which can increase programmer ... adding one simple parameter qualifier and removing a complex qualifier. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: About programing, a general question
    ...  Consider these for a beginner: ... C is not a simple language, it has a lot of subtlety and it is ... compilers any more :-) but I'd choose python or java to learn to ... depends on how the programmer views the problem. ...
    (Fedora)
  • Re: Ideal computer language from scratch?
    ... Does this mean every C programmer knows every other language ... A beginner C programmer, knowng nothing about the machine or asm, will ... The thing is totally diffrent with asm. ...
    (alt.lang.asm)
  • Re: paul grahams arc, a new lisp, and his words about makign code ?shorter, vs forth?
    ... I can try approaches that I wouldn't try in a language like Forth because dealing with the low-level storage issues ends up dominating my development time. ... I believe there is in some sense a "conservation of complexity." ... Or, for the same problem, a programmer might choose a simple low-level language, but now have to tediously specify each and every step. ... I can't count the number of times I've had a programmer proudly hand me an exquisitely crafted set of routines that presented some utterly simple and consistent view of problem being solved. ...
    (comp.lang.forth)
  • Re: Ideal computer language from scratch?
    ... Does this mean every C programmer knows every other language ... A beginner C programmer, knowng nothing about the machine or asm, will ... The thing is totally diffrent with asm. ...
    (alt.lang.asm)