[comp.sys.amiga.introduction] Learning C

Lee Sailer <UH2@psuvm.psu.edu> (05/06/91)

The best  to learn C depends A LOT (enough so that "alot" requires
TWO WORDS!) on what you already know.  C is a language very unforgiving
of simple mistakes, errors, and bugs, so the more ways you have
of avoiding them the better.

If you are already an expert programmer in a language more forgiving
than C, such as Pascal, Modula 2, or Oberon, then you should be able
to teach yourself C.  There are even languages "harder" than C, such
as Bliss.

If you are NOT already pretty proficient in some safer language, then
the fastest way to learn C is to learn a safe language first.  REALLY!
Learn Modula 2, or Pascal, or Oberon.  There are reasonable to excellent
compilers in both the PD and commercial market.  After 6 months, you
can convert to C in a few weeks.

                                  lee

soh@andromeda.trl.OZ.AU (kam hung soh) (05/09/91)

UH2@psuvm.psu.edu (Lee Sailer) writes:

>If you are NOT already pretty proficient in some safer language, then
>the fastest way to learn C is to learn a safe language first.  REALLY!
>Learn Modula 2, or Pascal, or Oberon.  There are reasonable to excellent
>compilers in both the PD and commercial market.  After 6 months, you
>can convert to C in a few weeks.

Learning Pascal and changing to C can be a traumatic experience, since
the novice programmer is removed from a safe, well-defined environment
and plunged into a site-dependent horror.  I believe a background in
assembly might be more suitable, especially when it comes to the use of
pointers, arrays and parameter passing.

Better still get C++; the user can program block-structured code and
avoid a lot of the common pitfalls found in C.  The C++ compiler will
do a lot of work that the UNIX ``lint'' utility used to do, such as
typechecking and warnings about uninitialised variables or unreachable
code.  When one becomes proficient in C, migrate to C++ and embrace
object-oriented programming (apologies to Eiffel advocates) without too
much pain.  Unfortunately, C++ compilers are not very common for the
Amiga yet.

Regards,

---------------
Soh, Kam Hung      email: h.soh@trl.oz.au     tel: +61 03 541 6403 
Telecom Research Laboratories, P.O. Box 249, Clayton, Victoria 3168, Australia 

labben@iesd.auc.dk (Lars Bodin) (05/10/91)

In article <1991May9.010822.14660@trl.oz.au> soh@andromeda.trl.OZ.AU
(kam hung soh) writes: >UH2@psuvm.psu.edu (Lee Sailer) writes: 
[stuffdeleted] 

>Better still get C++; the user can program block-structured code and 
>avoid a lot of the common pitfalls found in C.  The C++ compiler will 
>do a lot of work that the UNIX ``lint'' utility used to do, such as 
>typechecking and warnings about uninitialised variables or unreachable 
>code.  

A short comment... C++ compilers have a better typechecking than most
C compilers, but both Lattice C and SAS/C _does_ check for
uninitalised variables and unreachable code!

Also SAS/C has the best (most user-friendly) programming environment I
have ever seen on any machine I have worked with, which should make it
easier for the beginner to use the compiler.

[more stuff deleted...]
>Soh, Kam Hung      email: h.soh@trl.oz.au     tel: +61 03 541 6403 
>Telecom Research Laboratories, P.O. Box 249, Clayton, Victoria 3168, Australia 


Greetings, Lars Bodin.

--
AMIGA  //     Lars Bodin
      //      Department of Mathematics & Computer Science, 
   \\//       University of Aalborg (AUC)
    \/        E-mail: labben@iesd.auc.dk