4 ms·
I first started programming with C and had a terrible time. I didn't really get anywhere and went through a cycle of repeatedly giving up and them returning to
by djm 18y ago
I first started programming with C and had a terrible time. I didn't really get anywhere and went through a cycle of repeatedly giving up and them returning to it after having a break.
I don't think it's a good way to start programming but I would encourage people to learn it at some point because of the reason you gave.
I'd also suggest that the best way to get to grips with C is to learn assembly with a simple processor at the same time. People always seem to get stuck on pointers etc and that's easy to understand when you know a processor's addressing modes. Plus, it's always fun to use gcc to output (unoptimized) assembly code and compare it to what you would have written.
- axiom 18y agoI'm probably biased here, but I honestly can't imagine coming to grips with the way python handles variables without thinking of them as pointers and references (i.e. mutable vs. immutable, deep copy vs. shallow copy etc.) It would just seem to be a bunch of random special cases unless you know the machinery underneath. But definitely, C can be very frustrating. It takes weeks or months before you can do anything actually useful (not just nerdy fun, like calculating pi or something.) That being said, how do you explain the difference between an array and a linked list to someone who only knows python? to take a trivial example. Sure, you could, but it's extremely unintuitive. Whereas with C you're so close to the hardware that the distinction is obvious.