On Fri, Jun 07, 2013 at 06:16:03PM -0400, Dave McGuire wrote:
I learned C from the original K&R book as well.
It's an amazingly
good book to learn from. I was intimidated by C initially, but the
K&R book made it all easy.
I think a huge part of C's success comes from how well-written that book is.
The language itself (especially pre-ANSI C) is pretty undeserving -- it's
exactly the wrong kind of "low-level" language, i.e. it's designed to be
easy
for the compiler to compile, but it's clumsy about giving you control of bits
and bytes. So you get the non-portability of assembly code without the speed.
(Code that compiles OK but doesn't *work* is still non-portable.)
If they'd made it possible to declare variables/pointers/bitfields with a
specific word size and bit/byte order, and leave it to the compiler to take
care of ntohs() etc. w/o making it your problem on every single ref, it
would have saved a lot of people a lot of gray/missing hair...
John Wilson
D Bit