3 ms·
C was my first language as well, though this was a while back now. I found it was very valuable. It taught me many things and sparked my interest in computer pr
by tbirdz 12y ago
C was my first language as well, though this was a while back now. I found it was very valuable. It taught me many things and sparked my interest in computer programming. While my own experience with it was good, I hesitate when recommending it to beginners, especially now in the year of 2014, when machines are much faster and there are so many other exciting languages.
C, however, has a lot of traps and pitfalls that can be confusing or discouraging to a beginner. I think there are lot of people out there who gave up on programming because their first experience was in C. Weird operator precedence, automatic type conversions, the c preprocessor, differences between pointers and arrays (especially in regards to multidimensional arrays), the #include guard dance around header files, the way #include and header files works in general... There's just a lot of cruft and things about C that complicate the language beyond the inherent complexity of the machine itself. It can also be difficult to learn how to get the whole environment set up, learning about the process of compiling, linking, make, libraries, etc.
I don't think that C is the best first choice of a language for a beginner. Instead I would recommend a language that encourages algorithmic problem solving and computational thinking, something that is a further abstraction from the machine. Then after the student is comfortable with abstract problem solving, and "thinking like a programmer", you can introduce her to see what goes on "under the hood", so to speak, and delve into the lower levels. I would recommend C more as a good second language.
- getlaura 12y agoGood points! I especially agree with the preprocessor argument. Kind of forgot how confusing that was at first. But like everything with C, it does make you think about what's really going on. I like the title... Why C Should Be The Second Language You Learn.