Re:Ask HN: Why do you make class members private?
by kaba0 on Tuesday July 26, 2022 @02:13AM
(#32234919)
No, it didn’t fail. People are just bad at architecturing their programs and/or there is not enough time for technical debt.
While not much difference in C++ specifically, but having a distinction between a class that encapsulates state and a record/struct that is nothing but plain old data is essential in my opinion. Both are useful for different problems.
While not much difference in C++ specifically, but having a distinction between a class that encapsulates state and a record/struct that is nothing but plain old data is essential in my opinion. Both are useful for different problems.