Next privilege 500 Rep.
Access review queues
Next badge 0/1
~4k people reached
- 0 posts edited
- 0 helpful flags
- 9 votes cast
Is it okay to have objects that cast themselves, even if it pollutes the API of their subclasses?
@codebreaker If you're looping over all your objects and telling them to do something then obviously those things have something in common. This answer is telling you to figure out a name for the shared things, place them on the base class as virtual or abstract methods, and then override them in the sub classes. Is that specific enough?
How can I ask my boss (in a polite way) to comment his code?
The last sentence is the solution. Explain the whole situation: "I've been trying to think of a way to keep from bothering you when I have questions. I think it could help if you commented. Or would you prefer I ____?"