C

More and more often, these days, I see the opinion expressed that C is a dead, dangerous, stupid language and no one uses it anymore. For me, that’s like having someone start a discussion by saying ”As everyone knows the earth is flat…” I stop paying attention because I’m pretty sure that this person doesn’t know what they’re talking about.

Of course, it could be just another example of “Kids, today” and a longing for the way things were. I was therefore very happy to see this post by Ozan Onay on why it’s still important for young engineers to learn and be fluent in C. He gives four reasons for this:

  1. If you get away from the Web App startup culture, C is one of the most commonly used languages.
  2. C influences the design of most modern languages.
  3. C helps you think like a computer.
  4. Most tools for writing software are written in C (or perhaps C++).

Onay looks at each of these reasons and gives some possible objections to them. In the end, he settles on number 4 as the most compelling of them. I disagree with that last assessment. To me the most important thing—and reason enough to learn C—is that it helps you think like the computer.

Assembly language is even better for that but that ship sailed long ago. When I code in any language I find that I always mentally translate what’s going to happen into C. C is close enough to machine language that you can get a good idea of how fast something is going to run and how much memory it’s going to require. It takes a while to develop that facility, of course, but I don’t see how you can be a first rate software engineer without it. Otherwise, all you’re doing is reciting magic spells that you don’t understand except to the extent you know the result they’ll produce.

Or I could be just an old fool babbling on and on about the old days. But I don’t think so.

This entry was posted in Programming and tagged . Bookmark the permalink.