3 ms·
Yes you absolutely can, because the second you are writing C++ code with anyone but yourself you will eventually find, and have to rewrite, something someone wr
by zanny 8y ago
Yes you absolutely can, because the second you are writing C++ code with anyone but yourself you will eventually find, and have to rewrite, something someone wrote using malloc in C++.
I've found code where developers casted perfectly useful data structures to void* for no reason to then index into it by memory offset to access its fields, I've seen well architected concurrent classes destroyed by consumers "friending" it and then directly addressing internal private data meant to be guarded via accessor functions, and more.
C++ gives you infinite ways to shoot yourself in the foot, and even if you are the savant genius god programmer who manages to navigate its neck deep swamp of complexity your coworkers or even worse random strangers you collaborate with on the Internet absolutely won't.