Simpler object streams using generators