Monday, November 12

November 12th, 2001 § 0 comments

I’ve been trying to learn – really learn and understand, not just use ineffectively – the monster that is the Standard Template Library. The fact that the mud is written using STL classes doesn’t mean squat as far as my real understanding of the STL goes. Meyer’s latest book is helping a lot, and getting me past that “Ohhh, I get it” stage, but still, I have to wonder – is this:

for_each(fCharacterAffects.begin(), fCharacterAffects.end(),
	 bind1st(mem_fun(&Character::removeAffect), target));

really so much better (readable? maintainable? understandable?) than the following?

for (vector<CharacterAffect*>::const_iterator i = fCharacterAffects.begin();
     i != fCharacterAffects.end(); i++) {
     target->removeAffect(*i);
}

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

What's this?

You are currently reading Monday, November 12 at levork.org.

meta

  • Pages

  • Archives

  • Categories

  • Flickr