[ale] C programming books

Joe Knapka jknapka at charter.net
Wed Jun 2 05:47:06 EDT 1999


As far as C programming books go, it's hard to go
wrong with Kernighan and Ritchie, "The C Programming Language",
2nd edition. This is the definitive C tome. It does exactly what
you say you want: gets the basics out of the way and tells you
how to write useful code. It definitely could not be described as
"hand-holding."

Benjamin Scherrey wrote:
> 
> I recommend that you buy a C++ book instead and learn that. There is
> absolutely no reason to learn plain old C any more and if you later

While C++ is better than C for almost any task, I don't agree with this
statement. Since the C subset of C++ is *not* identical with C, if you
have to maintain a large body of C code (say, the Linux kernel <-- ON
TOPIC;^),
you will need a good C reference. Also, you can go out and steal
or buy an ANSI-standard-compliant C compiler; this does not yet
seem to be true of C++. (And specifically, the GNU implementation
of C++ is nowhere near as good as some commercial compilers,
which is sad. However, C++ is literally at least an order of magnitude
more complicated than C by almost any measure you choose, so
it's not surprising that the free software community has taken a
while to chase down the language definition.)

> decide to learn C++, you'll have to unlearn a bunch of bad habits that
> are common usage with C. You don't have to program object oriented to
> use C++. Just take advantage of it's easier to use constructs, type
> safety, great standard library (strings and containers oh my!) and
> you'll be a good bit further along than with plain old C.

I agree with the above.

> Its also much easier for a new programmer to learn than C.

Eh? K&R, 2nd ed., 261 pages. Stroustrup, 3rd ed., 870 pages.
Each of these books contains, in theory, everything you
ever need to know to be a competent C or C++ programmer,
respectively.

I suppose if you're used to something like VB, it's easier
to find a C++ feature or library that does approximately
the same thing (except GUI-wise); however, C++ is probably
the easiest language I've ever seen in which to implement
auto-pedal-ballistic code :-) (I've pretty much reduced
my own feet to bleeding stumps over the past
few years...)

> Besides, it pays better.

Certainly true.
 
>         later,
> 
>                 Ben Scherrey
> 

-- Joe Knapka
* I speak only for myself, except when the little transceiver
* at the base of my skull is activated...






More information about the Ale mailing list