2 ms·
On a related note, I think the most errors I've seen in sizable C++ systems has been operator overloading for things like '=' and '=='. Too much hidden magic c
by OneEyedRobot 5y ago
On a related note, I think the most errors I've seen in sizable C++ systems has been operator overloading for things like '=' and '=='. Too much hidden magic can occur.
- jeffbee 5y agoIf you don't override or explicitly delete them you get compiler defaults, which are even more magic and harder for the reader to reason about.
- OneEyedRobot 5y agoI agree, and I think it's probably a good idea for any class that isn't a simple structure with functions. I suppose that a problem with C++ (and the more feature-filled source control systems) is that it's dangerous to mix different levels of programmer sophistication in a team. The people are reflected in the code particularly as the obfuscation increases.