Original Post
Suppose my game has a bunch of foo objects, which need to be updated once every game cycle. Now I can think of two ways of doing this : The game engine can maintain an array / list / vector / whatever of foo, and iterate through it. Or the foo class can maintain a static array / whatever containing all active foo objects, and the game engine asks for the next one, or calls a static updateNext() method. Now my question is, is it the foo class's responsibility to know how many foos the game is using, as my second method requires? Conversely, why should the game have to maintain lists of all its classes? There might be bar, baz, whatever classes with similar problems. Opinions?