3 ms·
> 2. If your classes have so many members that it isn't clear whether a variable is a member or not, that's a class design problem. Now tell me why every OOP c
by jstimpfle 7y ago
> 2. If your classes have so many members that it isn't clear whether a variable is a member or not, that's a class design problem.
Now tell me why every OOP codebase I look at has this problem. ;-)
The reason is the second "O" in OOP. Trying to switch on the type of a thing, where every thing has only one type (ignoring inheritance which is another problem, not a solution), means that people will put all sorts of unrelated things in one place.