Mastery/Understanding of "C" unlocks ease to learning other languages?

Hi Zed,

May I first applaud your candor and continuous gifts to the community, you are very much appreciated.
I will appreciate your take on the following; I was having a chat with a senior developer, who happens to organize a Python user group that I attend here in Philadelphia called PhillyPUG.

The conversation was about the mastery of the craft of programming and software development and her take was that if one should study the “C” language, which she seems to be believe is the mother of programming languages, using her analogy of comparing “C” to say the study of Latin, which happens to be the etymology of a plethora of some scientific and English words, will indeed help one with the mastery of both aforementioned.

Her take is pretty much that the study and understanding of the “C” language, will bring about a great ease of learning and understanding other languages.

1 Like

Yes, that’s mostly what I think too. So many languages inherit features and designs from C–good or bad–that once you know C a whole branch of programming languages become much easier to learn. C is also the basis of many compiler designs and operating systems so once you learn it then a lot of things about computers become easier to understand.

But, I add a couple other things about C for beginners"

  1. C is terrible, and learning it should be considered akin to learning Latin because you need to understand words at medical school. Nobody should be writing new things in C or Latin because they’re both just weird given what we have today. C and Latin can both be fun though, so it’s not a chore to learn them, but you should definitely not roll out C thinking it’s the best language in the universe.
  2. Learning C helps you understand a large number of complicated things about operating systems and computers that other better languages hide from you. Once you learn things like, ABI, compilation, memory management, dynamic linking, etc. then quite a lot of other languages are just easier to understand.
  3. In my book I try to teach people how to break C and how to secure it as best you can. If you can secure C then you can do much better at securing any other language. The reason I say C is terrible is because it is impossible to secure because much of its Undefined/Unspecified Behavior is externally accessible through trivial attacks. Take C’s strings for example. The standard says that if you have a malformed string in your C program then oh well, that’s your problem, it’s undefined what happens. This lets compilers get away with not checking memory access on strings and even doing things to make them worse without telling you. The main flaw in this is not so much the undefined behavior, but that anyone sending you bad strings can access your ram. It’s an externally accessible undefined behavior that attackers can exploit. What’s worse is C diehards believe that this isn’t a problem, and that you just suck as a programmer (and then they go write C code that with ending security holes). I take the approach that you should assume C is broken, and if you have to use it, then just assume every function can get hacked and try to protect against it. You can’t do it 100%, but it’s better than the 0% attempts other C coders use.
  4. Saying you can code C today makes you seem hardcore so it’s easier to get a job.

That’s the main reasons I teach C. I personally don’t mind the language, but I abhor the way everyone who uses it pretends it’s not chock full of insane security holes by design.

Another thing I’ll point out is that, just because C is a language that will teach you all kinds of things about other languages, doesn’t mean it is a good first language. Too many people try to make beginners learn C as like some obnoxious SuperGeek trial by fire. It’s better to start with a nicer to use language like Python, then another like Ruby, then go learn C for the above benefits.


Hi Zed,

Thanks a bunch, for taking time out of your very busy schedule, to give such a thorough and insightful feedback. Much appreciated :):smile:

I’ll add that personally any time I do ANYTHING in c (i’m extremely noobish for what its worth) It clarifies or helps me understand something in other languages and in computers in general. Even a tiny question involving C requires a mini computer science lesson. I’m learning python and other languages for a job and fun. I’m learning C to understand the bones and core of computers in general.

I’m also not hardcore enough for assembly lol so C FTW!

1 Like