3 ms·
> Plus being a subset of C++, there is hardly any value in learning C as such, instead of good C++ idioms To say this is to miss the point entirely. A machine
by earenndil 9y ago
> Plus being a subset of C++, there is hardly any value in learning C as such, instead of good C++ idioms
To say this is to miss the point entirely. A machine runs not C++, but C. To learn how to use, e.g., std::vector (to cite a random example) is to learn a high-level programming concept which could be learned in any language but not to learn how the machine works. To learn how to use a char* in c++ is a complete waste and not different from learning how to use a char* in c.
- pjmlp 9y agoNo, you are the one missing the point. CPUs don't run C, and unless we are speaking about a PDP-11, the ANSI C abstract machine surely doesn't expose how this mobile phone CPU/GPGPU works. When I want people to actually know how computers work, I teach them Assembly. C isn't a special snowflake in the realm of systems programming languages, there are plenty of languages, some even older than C with the same low level capabilities. Had AT&T been allowed to sell UNIX at the same price the as other OS vendors were selling their products instead of giving it almost for free to US universities, we wouldn't be talking about C nowadays, and probably also not about C++.
- earenndil 9y ago> C isn't a special snowflake in the realm of systems programming languages, there are plenty of languages That's just not true. You see something like assembly, which seems so low-level and implementation-focused, and then you see java with all its high-level complexity and it seems like it's fundamentally something different. C bridges that gap, because you can see all the ways in which it's exactly the same as assembly, yet all the ways in which it's exactly the same as java. If you truely want to understand a computer on every level from silicon to state-machines (idk, it was the first thing that came to mind), C belongs on that stack. What makes c special is not its capabilities, but rather its lack of abstraction.