4 ms·
I was with you until the part about C++. I spent very little part of my career writing C(mostly embedded hobbies) but still managed to pick up all the important
by vvanders 9y ago
I was with you until the part about C++. I spent very little part of my career writing C(mostly embedded hobbies) but still managed to pick up all the important bits(memory layout, CPU caches, allocation costs, processor pipelines and the like) from C++.
Really it wasn't too long ago that the STL just wasn't good enough for high performance code and we rolled our own containers/pooling/everything. Modern C++ is a very much a different beast these days.
- maxxxxx 9y agoI think I expressed my thoughts wrong. I didn't mean to say that you need to learn C to use C++ but that if you do any serious C++ work you will know a lot about the way C works. I don't think you will go very far in C++ if you don't understand pointers, heap vs. stack, when to allocate and release memory and a lot of other stuff.
- vvanders 9y agoAh, I think we're just arguing semantics then. I see that as very much a part of C++(new vs malloc only has some small subtle differences for instance). I will say if you don't understand pointers you're in for a world of pain in C++.
- mikepurvis 9y agoAnother important thing is understanding what's going on under the hood with C++ features— like, how you'd compile C++ into C. I don't put a ton of weight in it, but I enjoy engaging interview candidates about what's going on with virtual methods, casting classes, specialization with polymorphism vs templates, "public virtual" and multiple inheritance, etc etc. Like I say, no one thing is super interesting on its own, and its not a textbook answer I'm looking for, more just a sign that someone was curious enough to dig in at some point and figure out how the sausage was made.
- deathanatos 9y ago> I don't think you will go very far in C++ if you don't understand pointers, heap vs. stack, when to allocate and release memory and a lot of other stuff. This reads to me as if you ascribe those attributes to C, which simply isn't true; C++ has an equal (to C) concept of pointer, allocation/freeing (and, with RAII, I would argue superior).