Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: C help please - C newbie



"Bryan Bullard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> "Chris Hills" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> chris,
>
> i can respectfully acknowledge you're point of view.  however, i and many
> others believe the k&r book is still valid for learning simply because all
> the concepts are plainly stated and explained. it is an easily and quickly
> digestible text.
>
> also, i will remind you that off all the c code out there a relatively
small
> percentage of it adheres to C90+.
>

These things are all a matter of opinion, of course, so here's mine...

The original K&R book was written in the seventies, when C was new.
However, we are no longer living in the seventies, and C has changed a great
deal in the last 30 years.  Obviously it is still lumbered with many of the
design decisions that don't fit with modern language design (for example,
the idiotic idea that everything at file scope has global linkage unless it
is explicitly declared static, or the joys of "break" in switch statements),
but a great deal has changed for the better.

The O/P wants to learn to *write* C code.  He should learn to make the best
of C as it stands *today*, in popular compilers *today*, and if it turns out
that one day he has to write code for an ancient non-ANSI C compiler, then
he can deal with it at that time.  In the meantime, he should be writing C
code that is as solid and readable as possible - all functions should be
prototyped, using // comments, static inline functions, consts and enums
instead of #defines, and so on.

The K&R book may be a great teaching book - it is a long time since I read
it, so I can't remember - and it may be better in that sense than some
modern text trying to teach you everything in 24 hours or 21 days or
whatever.  The trouble is, it would be teaching him the wrong thing.

David


> -bryan
>
> > In article <[EMAIL PROTECTED]>, Bryan
> > Bullard <[EMAIL PROTECTED]> writes
> > >
> > >"Bradley" <[EMAIL PROTECTED]> wrote in message
> > >news:[EMAIL PROTECTED]
> > >
> > >get a copy of K&Rs The C Programming Language.
> >
> > Do NOT get a copy of K&R
> >
> > > do all the exercises.
> > Do NOT do the exercises
> >
> > >  many
> > >people agree that though the book was written in the seventies, it's
> still
> > >the best book for students and professional reference.
> >
> > Not it is NOT. K&R was written for desktop/ Unix programmers in 1978
> >
> > K&R SECOND edition was in 1988 the year before the ANSI C standard (C90)
> > and two years before the ISO C standard C90.
> >
> > Most embedded compilers adhear to C90+ the TC's and Amendment A1....
> > Effectively C95.
> >
> > So K&R is well out of date. There are many better books available for C
> > programmers doing embedded work.  What sort of targets are you looking
> > at?
> >
> > See the book reviews at
> > www.accu.org
> >
> > This is a C programmers web site with reviews of over 3000 books.  NB
> > the ACCU does not sell books
> >
> > Regards
> >         Chris
> >
> > PS, just for the record I do have a copy of K&R (2nd ed) but I would not
> > use it to learn from.
> >
> > /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
> > \/\/\/\/\ Chris Hills  Staffs  England    /\/\/\/\/\
> > /\/\/ [EMAIL PROTECTED]       www.phaedsys.org \/\/
> > \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
>
>





<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.