3 ms·
I used to be very much against private methods and though I have eased up a little, I still prefer classes with only a small number of public methods and no pri
by jxcole 17y ago
I used to be very much against private methods and though I have eased up a little, I still prefer classes with only a small number of public methods and no private methods.
It's true that you have a lot more classes, but these classes can be separated into packages. The encapsulation is still there (private members vs. private methods), and the encapsulated code has a greater ability to be reused or unit tested (if you're into that.)