3 ms·
"Moving these methods to collaborators and making them public creates opportunities for future reuse without reducing the clarity of the original code." That's
by stcredzero 17y ago
"Moving these methods to collaborators and making them public creates opportunities for future reuse without reducing the clarity of the original code."
That's not even always true. Sometimes, the best way to express an algorithm may be with a recursive function. Making those separate objects might even slightly reduce the code's clarity. The code smell here should not be the private methods. It should be such private methods with similar functions repeated in several objects. Let "a need for reuse" become self evident, then refactor for reuse. Otherwise, you are just pre-optimizing. YAGNI!