2 ms·
I know someone who writes his C++ like it is C; it is truly horrible to read and riddled with bugs. He does C-style casts from siblings in a class hierarchy, wh
by 72deluxe 11y ago
I know someone who writes his C++ like it is C; it is truly horrible to read and riddled with bugs. He does C-style casts from siblings in a class hierarchy, which in my mind is insane - they clearly are NOT castable in a safe way; only up the hierarchy is safe. No use of dynamic, reinterpret, static casts - all C-style. For loops are used everywhere instead of std algorithms. He doesn't see the point of references (pointers everywhere!) and const correctness is an expression he has never heard of, let alone abides by.
I realised the lack of C++ knowledge when he said "what is push_back???" with a vector. I can only imagine the brain implosions when lambdas replace all those stupid struct unary predicates I have to litter my code with, and when I implement move operators.
I am trying to convert my code to C++11 (mostly it is 03 style) which will necessitate a move in Windows compiler version but no big problem (and not too many changes - I use STL containers everywhere).