| ▲ | mmilunic 2 days ago | |
I would say from a pedagogical perspective, learning C is hugely useful for understanding how programming works at a much lower level. This has the benefit of you learning about manual memory management and how to deal with all the issues that come with such a rules free language like C that will basically let you do anything. This understanding means lot of the constraints and features that safer languages like Zig and Rust add start to make a lot more sense. For example, going from Python to Rust, the borrow checker will probably seem rather arbitrary, but going from C to Rust, you will find the borrow checker is just automating a lot of checks you were already doing yourself. TLDR: Learn C. I would recommend the 15122 CMU course as a pretty good foundation. You can find it online here https://www.cs.cmu.edu/~15122/schedule.shtml . | ||
| ▲ | SoftTalker 2 days ago | parent | next [-] | |
For that matter, assembly is useful as well. Not that you have to become an expert in it, but do enough that you understand it from a practical standpoint. It doesn't even have to be on x86, use an emulator of something simple like a 6809 or 6502. I never had trouble understanding pointers in C once I had some experience writing assembly code. | ||
| ▲ | pjmlp 2 days ago | parent | prev [-] | |
Another quite good one is Modern C from Jens Gustedt. https://www.manning.com/books/modern-c-third-edition This is the kind of book to learn C from nowadays, not a dusty copy from K&R C, leave that one for historical purposes only. | ||