4 ms·
Learning to program is about solving problems using a computer. Any programming language allows this, however some languages make it harder than others, and C
by gnuvince 11y ago
Learning to program is about solving problems using a computer. Any programming language allows this, however some languages make it harder than others, and C is in that category. A language like Python has very little quirks that will stump a person coding for the first time in their life; in C they'll wonder "what does int main(int argc, char argv) mean?", "why is there a & before my variable in a scanf but not in printf?", "what are 'nul-terminated' strings?", etc.
A programmer should definitely eventually learn C, but there's no reason it needs to be their first language and definitely no reason it should be their only language.
- DyslexicAtheist 11y agoI agree it is not easy. Though I never said that it should be the only language! Emphasis was on the fact that one could build a career on C more than any other because of the additional overhead / toolchain baggage. (I quite frankly haven't met anyone who only knew C tbh and doubt such individuals exist in the industry (in a successful capacity))
- bluedino 11y ago>> A language like Python has very little quirks that will stump a person coding for the first time in their life Python is great but some of the things I've come across: Why do some keywords use parenthesis and others don't? What's this Python 2/3 hubbub all about? What are __INIT__ and __MAIN__? Why do I see single, double, and triple quoted strings? What does the u prefix mean in u"Hello World"?
- kedean 11y agoWell sure, every language has its quirks, but those last four aren't going to show up unless the person starts diving into an existing codebase, which shouldn't happen if they're still learning. The keys/parenthesis bit I will concede is a bit of a problem.
- vram22 11y ago>in C they'll wonder "what does int main(int argc, char argv) mean? They'll only wonder that if the book / course / instructor teaching them C, does NOT explain it to them. Which would be more of a reflection on said book / course / instructor than on the C language or the students.
- na85 11y agoFor students who are just learning to wrestle with the programming concept, python is far superior because it lets the student focus more on what to express and when, and less on remembering silly things like curly braces and semicolons.
- vram22 11y agoFirst, braces and semicolons are not silly. They are just a different form of syntax than indentation. (And I say that as a Pythonista of many years, who also learned and then used C a lot before learning Python.) Second, your point may (or not) be correct, but it is at best tangentially related to the point I was replying to, or to mine.
- na85 11y agoI don't think it's tangentially related at all. The cognitive load of trying to program for the first time is quite high. If the student doesn't have to focus on remembering whether or not you need a semicolon or a colon on switch statement cases, they can focus more on actually grokking the process of translating thoughts and algorithms to code.