I'm a Systems Reliability and DevOps engineer for Netdata Inc. When not working, I enjoy studying linguistics and history, playing video games, and cooking all kinds of international cuisine.
because it's hard because of pointers, address, DMA, no OOP, no abstractions etc
Pointers are only hard if you're not paying attention and didn't have them explained properly. If you properly explain the concept of indirection first (which most people will have no issue understanding, as the concept is baked into most natural languages), pointers will often come naturally as a logical extension when explained.
DMA is not a thing in most C coding unless you're doing OS-level code (like Linux kernel code) or tight embedded stuff that doesn't involve an OS. In fact, I've done a decent (not huge) amount of work in C and never touched DMA at all. It's more an assembly thing in many cases anyway.
OOP and abstractions are absolutely possible in C, that's part of what pointers (especially function pointers) and structs are for (your object is a struct, your methods are function pointers, and you use a constructor method just like you would in many languages). Check the Linux kernel source code if you don't believe me, they're more object-oriented in some places than a lot of C++ code I've seen.
Hi, I'm Swastik Baranwal, a software developer from New Delhi, India passionate about open-source contribution, Gopher, Pythoneer, Compiler Design and DevOps.
I agree with you. I meant that the standard library does not provide with abstraction like modern languages give. You can even in OOP in ASM as well if you see it that way.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
A couple of nit picks:
Pointers are only hard if you're not paying attention and didn't have them explained properly. If you properly explain the concept of indirection first (which most people will have no issue understanding, as the concept is baked into most natural languages), pointers will often come naturally as a logical extension when explained.
DMA is not a thing in most C coding unless you're doing OS-level code (like Linux kernel code) or tight embedded stuff that doesn't involve an OS. In fact, I've done a decent (not huge) amount of work in C and never touched DMA at all. It's more an assembly thing in many cases anyway.
OOP and abstractions are absolutely possible in C, that's part of what pointers (especially function pointers) and structs are for (your object is a struct, your methods are function pointers, and you use a constructor method just like you would in many languages). Check the Linux kernel source code if you don't believe me, they're more object-oriented in some places than a lot of C++ code I've seen.
I agree with you. I meant that the standard library does not provide with abstraction like modern languages give. You can even in OOP in ASM as well if you see it that way.