-
Notifications
You must be signed in to change notification settings - Fork 323
Why Learn C?
This author puts forth a really good argument for why he thinks every programmer needs to learn C: https://www.pluralsight.com/blog/software-development/why-every-programmer-should-learn-c
The one overarching goal with languages in CS is to learn to learn new languages. It's not to learn C. It's just that C has a number of desirable characteristics.
(This goal is a subgoal of our primary: learning to learn. We choose topics that support that goal; we like to also teach things that you're likely to see. That's a secondary influence on curriculum in CS.)
Being able to pick up a new language in a short time is skill all devs are expected to have in the field.
For web, a prime candidate today for that is TypeScript. But with WebAssembly coming, the number of web dev languages is ready to explode. And people who have been programming iOS for a while have already seen a new language burst on the scene.
In terms of the goal of learning to learn new languages, what we want is:
- A new language that's unlike languages you already know.
This is where the learning comes in. The goal is to be a tough, brain-stretching challenge so that the amount of learning is significant.
If the language is too similar, the amount of learning is small.
If the language is too different, the learning curve becomes prohibitive. We don't teach Rust, LISP, or Erlang for this reason.
- A new language that's challenging.
In the same vein, a language might be different and unchallenging. Go and Swift are good examples. These are great modern languages, and anyone remotely skilled can pick them up in short order.
As you learn the new language, keep in mind that the skill is actually learning to learn the new language. You are practicing skills that apply to more than just the language in question.
A lot of great devs also know assembly language. Not because it's something they ever use at work, but because the skills they gained over the course of learning assembly language were so broadly useful and powerful in other areas that it set them apart.
- A language that we can become proficient in during our short time at Lambda School. It would take three C++ sprints to get to the same level of proficiency that we get to in a single C sprint.
C has a number of additional benefits.
-
It's low-level. Being this close to the metal helps demystify the computer, especially given the context you'll get in computer architecture. Demystifying the computer is one of the primary goals of the CS program.
-
It gives you perspective on other languages that you wouldn't get from a similar language, or just more of the same. This perspective is powerful because virtually every other language you encounter will fall between C and JS in terms of complexity and ease-of-use. These new languages will be within your sphere of experience, and far less intimidating.
-
The fact that you have to do all this manual micromanaging of memory and pointers is hard. This makes all other languages seem easy by comparison.
-
Pointers are a thing in other languages. Notably C++ and Go both heavily use pointers.
-
C++ is a superset of C. You basically cannot learn C++ without learning C in the process. C++ support is in the WebAssembly MVP.
-
Knowing C is a badge of pride. It's has deep roots in computing history and is full of concepts that many devs of lesser knowledge find quite intimidating. If you can program in C, you can program in just about anything.
Great race car drivers are skilled in any car. Great devs are skilled in any language. Be great in whatever language you use.
We all have our opinions, of course. Many people think C++ is a horrible language. But if a good dev sat down with it for 2 weeks, they'd be a good C++ dev. In a month they'd be a great C++ dev.
You might worry that you're getting rusty on JS, Swift, or Java. And unless you're writing in one of those languages every day, you are. But the good news is the rust shakes off fast. You can be rust-free after two hours of refresher.
In a nutshell, that's the C rationale.