3 ms·
And you are correct that there are cases where this is true - but the best approach is to use an element of judgement and make a call when this is likely to pay
by arethuza 14y ago
And you are correct that there are cases where this is true - but the best approach is to use an element of judgement and make a call when this is likely to pay off in the long term. Always using primitives for everything or never using primitives because you might need to augment them structurally at some point are both silly extremes that are equally bad.
- flatline3 14y ago> Always using primitives for everything or never using primitives because you might need to augment them structurally at some point are both silly extremes that are equally bad. I agree.
- dhimes 14y agoTrue, they are silly extremes. But as guidelines they are not equal. One may lead to a few extra "waste" classes, but the other can fook things up. They are to be taken in the same vein as "prefer implementation to extension (program to interfaces rather than classes)" and so on. Not gospel, but advice from some of those who have been down both roads and are calling back to us. Advice meant to give you pause as you set about building that subclass. It should be obvious that design strategies that allow change without breaking signatures are good things. Maybe they are not needed or wanted absolutely everywhere, but certainly, if there is any doubt, they should be used.
- arethuza 14y agoWell, my experience redesigning large-scale enterprise applications built to be "generic" is that almost nobody gets the balance right but by far the worst applications to work with are the over-architected over-generic solutions.
- dhimes 14y agoYes, I've dug myself into holes with this before. Usually with "factories" and such.