5 ms·
A lot of static methods on a Util object strikes me as a smell in the context of this discussion. In OO-land it's not a smell per se because often you have no a
by wonderzombie 14y ago
A lot of static methods on a Util object strikes me as a smell in the context of this discussion. In OO-land it's not a smell per se because often you have no alternative. But functionally your class is a glorified namespace.
- weavejester 14y agoWhat do you mean? I don't believe anyone is suggesting that if you have many static methods or functions, they should all be put in one namespace.
- Ralith 14y agoI think that's exactly what dclowd9901 was suggesting, though he may not have fully considered it.
- dclowd9901 14y agoNot necessarily. Of course defining classes is tricky, and there's no such thing as a rule of thumb, and that's more what I was trying to relay with my comment. And I agree with others who are saying that a piece of software where objects are crammed with tons of static classes is bad OOP.