Skip to main content
5 events
when toggle format what by license comment
Jun 11, 2011 at 8:22 vote accept Paul
Jun 6, 2011 at 11:51 comment added Martijn Verburg Great question and great answer, and the best thing is that multiple developers can learn from it. This is why I love hanging out here :). Oh and so my comment isn't completely redundant, SRP can be a little bit tricky because you do have to have to ask yourself 'what if', which can seem counter to: 'premature optimisation is the root of all evil' or 'YAGNI' philosophies. There's never a black and white answer!
Jun 6, 2011 at 10:26 comment added Ed James Yeah, like I said, my C++ skills are pretty rusty so I struggled to come up with a viable demonstration of the issue, I agree about the flexibility thing. It really depends what you're going for with your code, like I said, I think your original code is perfectly reasonably solution to the problem.
Jun 6, 2011 at 10:24 comment added Paul Ah, I see: if I add one more way to load a font, I'll need to add one more acquire function to the manager and one more load function to the resource. Indeed, that's one disadvantage. Depending on what this new source might be, however, you'll probably have to handle the data differently (TTFs are one thing, font sprites are another), so you can't really predict how flexible a certain design is going to be. I do see your point, though.
Jun 6, 2011 at 10:11 history answered Ed James CC BY-SA 3.0