
Survey on using C as intro CS langauge (?)
: Has anyone taken a survey on using C as a first language in a
: course for computer science and other science students. If so I
: would be interested in finding out since we are planning on
: using C in such as course.
I don't know anything about a survey, either, but perhaps this thread
will develop to something like that.
I'm a fan of C, but, in my opinion, DON'T USE C FOR BEGINNERS. Reading
this newsgroup shows much of the problems beginners face with C.
C is the language for professionals, those who know what they are
doing. You need much experience to write reasonable C programs.
Programming is easy, good programming is very difficult. To learn
about structured programming, C is the wrong choice, which
does not mean that you cannot write structured programs in C, but
you need a lot of experience to do so.
Note that most warnings a C compiler may issue should be considered
a mistake, and are normally treated as such in other languages.
Even worse: Many Compilers does not issue warnings at all.
For instance: Try to explain a beginner why he or she spent half
a week searching for a mistake in the following code:
void f (CounterPtr)
int *CounterPtr;
{
...
*CounterPtr++; /* <--- Oh no!!! */
Quote:
}
main ()
{
int Counter;
f (&Counter);
...
Quote:
}
A mass of similar examples may be found.
I think, Modula-2 is a much better language to learn about
programming. The concept of modularity is much better evolved:
You have to write a definition for each module, unlike in C,
where often only one header file is used for all modules
(bad programming style in my eyes). Modula-2 is more restrictive,
which is a disadvantage for an experienced programmer, but which
is an aid for beginners who have no clue of what is good programing
style. Sure, writing awkful code is also possible in Modula-2 and
beginners will need much guidance even in this language, but
starting with C will lead to a disaster.
Greetings,
Jens.
_______________________________________________________
_____ ___ ___
|___ | | \/ | FernUni Hagen
_ | | | |\ /| | LG Informatik IV
| |_| | ens | | \/ | | oeller
\____/ |_| |_| D-58084 Hagen