muazzam wrote:
I've written an OS, which is self-hosting, in an assembly language. And believe me or not, I know nothing about C. I can (barely) understand the code written in C, though. I've tried several times to learn it but it's too hard...
I believe you. Been there.
muazzam wrote:
I've tried several times to learn it but it's too hard and probably useless. Just assembly is enough for me.
I don't think I could find a job in low-level areas (OS, embedded, etc), where I could get away with just assembly language. (
NASA is looking for living dinosaurs who can program in assembly, FORTRAN and COBOL.) I've been cashing my C, C++ and assembly knowledge and skills for the past 15 years or so.
Nevertheless, I too had a tough transition to C. I learned my first programming languages in this order: ZX Spectrum BASIC, Z80 assembly, Borland/Turbo Pascal, i8051 assembly, x86 assembly, C. Like I said earlier, C is awkward for historical reasons. This is of little help to a beginner, of course, but C is not awkward for the sake of being awkward or keeping noobs out. The titles and the links shown above should be sufficient for learning proper C. But you also need to write lots of code to internalize the language. If you have a friend, who knows C well (preferably, very well, because it's not uncommon to learn bad habits from someone knowing it poorly or having major understanding gaps when it comes to things like undefined behavior), then their help can be tremendous. And, IMO, you don't need a lot of help. You probably just need some help with navigating through a few bad places. Otherwise the language is rather simple.