Hacker News new | ask | show | jobs
by nine_k 2107 days ago
Do people still use the K&R style of declarations?

OTOH a microcontroller is an acceptable approximation of a PDP-11, so much of the old approaches are very directly applicable.

2 comments

The 2nd edition circa 1988 uses ANSI style declarations.
And has never been updated ever since. Latest standard revision is ISO C17.
Thank god. I’d hate to see the book grow to a thousand pages.
On the other side it is full with outdated information and examples that lead to unsafe C code, not much to be happy about.
Name one from the second edition? I found the book’s examples to be fairly timeless.
It is 2000 km away from where I live.

Not going to buy another copy just to make someone happy on Internet.

But still, most examples don't proper error correction, don't teach about use of bound checked strings and vectors, and if I remember correctly there are examples with gets().

I am sensing a confusion. Syntax has nothing to do with applicability to microcontrollers.
Yes. But the general approach does.

If you drop down to C on x64, you likely deeply care about cache efficiency, pipelines not stalling, etc.