Relative Content

Tag Archive for class-design

How do you balance out code structuring (few big functions vs. many small ones)?

The golden rule of code structuring is always said as splitting into many sub functions is a good thing. Though I noticed it becomes a problem in complex applications when a class of e.g. 10 bigger functions is split into a class with 50 functions. When development went so far, it becomes quite hard to understand the concept of the class, I mean you lose survey. This is often the case when you look into code of others or in your own code after some months past.

which style of member-access is preferable [duplicate]

This question already has answers here: When are Getters and Setters Justified? (14 answers) Closed 11 years ago. the purpose of oop using classes is to encapsulate members from the outer space. i always read that accessing members should be done by methods. for example: template<typename T> class foo_1 { T state_; public: // following […]