3 ms·
Not really. You can write Python fast and slow, so if you do write Python code, you can perfectly well care about performance. Learning C takes months to years
by aw3c2 11y ago
Not really. You can write Python fast and slow, so if you do write Python code, you can perfectly well care about performance. Learning C takes months to years while adapting my Python code takes minutes to days.
- ZenoArrow 11y ago> "Learning C takes months to years" Where did you get this information from? Learning C is easy. K&R is under 300 pages long, you could get through it in a weekend: https://en.m.wikipedia.org/wiki/The_C_Programming_Language https://en.m.wikipedia.org/wiki/The_C_Programming_Language After that you could pick up another more modern book, or could just learn as you go.
- aw3c2 11y agoIf you have CS background, lots of experience and are willing to manually allocate memory, maybe...
- ZenoArrow 11y agoNo, you don't even need that. C was either my first or second programming language, learnt it around the time I learnt VB and I didn't feel overwhelmed, was probably around 16 at the time, a time when my main experience with computers was playing computer games. Part of the reason for its popularity is its simplicity. Memory management isn't as hard to grasp as you might think. It's really just an extra step when it comes to handling variables, if you make plans to handle errors then it is straightforward to manage, especially for small libraries, which is what you're likely to write to link up to Python.
- aw3c2 11y agoYou should really check out how random people code in the real world. C is absolutely not the right language for "Dad" while Python is very easy to start with and do advanced stuff with. I am not talking about "programmers" but "people who manage to automate things on their computer".
- ZenoArrow 11y agoI've programmed in Python before, it's a good language, very broad library ecosystem, and yes it's a good first language as well, but if you're already familiar with imperative-style programming from Python you are not going to struggle with C, I am confident you could learn it quickly. If you've put off learning C because it's too 'hardcore' or some nonsense then try it out, you may be surprised to learn you like it.
- oldmanjay 11y agoC would make a great video game, it's easy to learn and difficult to master.
- ZenoArrow 11y agoSure, I'd go along with that. What I'd also say is that you don't need to be a master of C to write faster code than Python. I understand the appeal of keeping a codebase in a single language, but it's worth remembering you pay a cost for doing so.
- deleted 11y ago[deleted]
- TazeTSchnitzel 11y agoYou can't get through K&R in a weekend unless you skip the exercises.
- ZenoArrow 11y agoThe decision on whether to skip the exercises or not should be based on how you learn. I've found the most effective way for me to learn a new language is to watch or read some introductions to a language (to get a feel for idiomatic usage), then explore further through playing with small projects written in that language. That's what works for me. K&R is sold as a concise introduction to C, so it has value for learners like me even with skipping the exercises. Of course for people who prefer to learn methodically doing the exercises will be more beneficial.