3 ms·
I've heard it said that having any class name as [verb]-er is an OOP anti-pattern, as your objects shouldn't be simple nounifications of verbs.
by SilasX 14y ago
I've heard it said that having any class name as [verb]-er is an OOP anti-pattern, as your objects shouldn't be simple nounifications of verbs.
- Evbn 14y agoThat rules of thumb is arbitrary attempt to make code more like fancy English. Why is "connection" OK but "connecter" bad?
- SilasX 14y agoIt's not the name per se that is the problem; the point is that an "-er" class is indicative that you're actually using a procedural rather than OO paradigm, and thus attempting to arbitrarily box up a bunch of actions into an object. Neither connection nor connector would be good, under this view, if it's just a thin package around an imperative program ("COBOL written in Java").