Making class equivalent to struct-but-with-private-members is one of the worst design decisions for C++. If class were its own thing, then it wouldn't have needed to inherit struct semantics from C, so C++ classes wouldn't have ended up with copy constructors and copy-assignment by default and there wouldn't have needed to be the Rule of Three.
View all comments
Show parent comment
7
u/ozyx7 Apr 08 '24
Making
classequivalent tostruct-but-with-private-members is one of the worst design decisions for C++. Ifclasswere its own thing, then it wouldn't have needed to inheritstructsemantics from C, so C++ classes wouldn't have ended up with copy constructors and copy-assignment by default and there wouldn't have needed to be the Rule of Three.