[Effective-cpp] Item 1: Uses and Abuses of vector

Paul Grenyer paul at paulgrenyer.co.uk
Sun Oct 31 16:58:26 EST 2004


Hi

> I was just pointing out that the problem of finding meaningful 
> identifier names is wider in scope than the naming of function 
> objects.

Of course. :-)

> Surely the "cout" in parenthases following "write" gives a clear 
> hint at the destination of the write.
> 
> Having said that, the statement I posted was:
> 
> for_each(c.begin(), c.end(), write(cout));
> 
> But you seem to have removed the salient part in your quote.

Nope. There seems to be something strange on the list that removes 
code sometimes. Yours was not the only post affect.

Yes, the presence of cout does make it clearer. This is still a 
trivial example though and, as I said, for non-trivial examples I 
would still use a functor. 

Regards
Paul

Paul Grenyer
Email: paul at paulgrenyer.co.uk
Web: http://www.paulgrenyer.co.uk

Have you met Aeryn: http://www.paulgrenyer.co.uk/aeryn/?
Version 0.3.0 beta now available for download.





More information about the Effective-cpp mailing list