4 ms·
What knowledge about C do you think does someone miss when he is using C++? I have made the experience that a good C++ developer also automatically knows every
by albertzeyer 16y ago
What knowledge about C do you think does someone miss when he is using C++?
I have made the experience that a good C++ developer also automatically knows everything about C.
- BrandonM 16y ago> I have made the experience that a good C++ developer also automatically knows everything about C. Not even close in my experience. In college, we used C++ in our intro course. The addition of pass by reference, classes (with constructors and destructors), and the standard library (e.g. std:string) hides a lot of the common paradigms of C, and that's not even mentioning boost. In my experience, people coming from C++ tend to write really bad C. Many of them have a poor understanding of the concept of pointers. Once you get familiar with some good C design patterns, it's pretty easy to write clear, modular C. Knowing C++ is not a very effective measure of ability to use C.
- warmfuzzykitten 16y agoAu contraire, a modern C++ developer probably knows nothing about C. Good C is like good assembly language: dense and performance-obsessed. No objects, no exceptions, no STL, bare bones and riddled with pointer manipulation and macros.
- util 16y agoNo objects = no structs?
- crpatino 16y agoNaive C++ programmers tend to use pointers as if they were references. They do not seem to understand pointer arithmetic, pointers to functions, etc. They also do not seem to have a deep understanding of memory models, and tend not to understand memory alignment. They do not use bit-wise operators much, though it's more of a cultural thing than skills issue. I have never met a competent C++ programmer that does not have at least some exposure to C as well. But I'd dare to guess, that such character would not understand the C preprocessor in any but the most trivial level. [edit] I originally used the phrase "C with classes" crowd, in a rather derogatory way, to describe the people who never get to learn any of the languages well, and end up writing some sort of sanitized, structured-programming, algol derivative in (a subset of) C++ syntax. While reading the rest of the comments, I remembered that "C, with classes" can also apply to C hackers that just use C++ to structure their C-styled code, and may take advantage of a few features of the language. I have edited the comment to clarify what I meant.