Live data from Hacker News

Teach Yourself C in 24 Hours (1997)

aelinik.free.fr

81–83 of 83 posts

Re: Teach Yourself C in 24 Hours (1997)

#81
post #38

Earlier quoted context omitted.

I read K&R when I was 15. It was definitely good enough. Platform specific books also helped a ton. I was into the Amiga at the time - '90 or '91 or so - and you really needed extra info to do anything interesting.

Sassenrath was not a Posix guy, for sure. But the Amiga was not a common platform.

It was quite common in many European countries.

Re: Teach Yourself C in 24 Hours (1997)

#83
post #33

Earlier quoted context omitted.

Is C11 a plus though? It has features strongly diverging from C++ (e.g. struct initializers), and may only add confusion.

The languages, idioms, and ecosystems are different enough that I don't see that as a problem. They should be treated like two different languages. You wouldn't read a C book and expect to understand the conventions of C#. Neither should you for C++.

The problem is, C-only codebases are pretty rare, even established ones adopt C++ (e.g. Darktable, which has a rather advanced C-only object system for UI and plugins). Especially in 'hot' topics like AI, where there may be place for pure C, but actually you'd more often use some low-level subset, like C with templates (very useful in writing image processing libraries). And no, I don't think it's reasonable to learn the modern C++ straight away, skipping C part: its abstractions are very leaky, you need to understand underlying resource management and type system.

If you don't plan to learn C++ later, okay, do use a modern version, but if this is a possibility, better start either in completely different language with more clear semantics (pascal was great, maybe some Go or Rust are good now), or the pure subset, which wouldn't add to later confusion but would allow to use more advanced abstractions as needed.

From my experience teaching software engineering to high school students which already passes their algorithms & programming courses, small differences in practices and/or semantics (svn commit vs git commit) is what kills learning progress.

Post reply on HN