Boost logo

Boost :

From: Mattias Flodin (flodin_at_[hidden])
Date: 2002-05-13 09:13:29


On Mon, May 13, 2002 at 02:59:03PM +0200, Giovanni Bajo wrote:
> - As I have already said, I hate the abuse of operators for anything that's
> not strictly related with their common usage (with builtin types). operator%
> to substitute an argument is a heresy for me, but YMMV. Also, it doesn't
> allow formatting options to be specified at parameter-usage time.

I heartily agree, which is one of the reasons I detest iostreams. But
- in this case, since we're dealing with iostreams which already
overloads << and >>, it doesn't seem like overloading another operator
would make any difference. The damage is already done, so to speak.

But, I believe this has already been argued over earlier. I didn't
have the patience to follow that debate, but I assume it either ran
out of steam when people got tired of arguing, or that consensus was
reached. Depending on which, % overloading is 1. already agreed on as
being OK, or 2. something that is so difficult to agree on that we're
going to annoy people no matter which path we choose, so we might
aswell just leave it be.

> - It doesn't substitute/enhance std::string, but it acts as an external
> library. You can either feed the result of format() to a stream, or use the
> member .str() to get the string.

Yes, whether this should be so may be an interesting point to discuss.

/Mattias

-- 
Mattias Flodin <flodin_at_[hidden]>  -  http://www.cs.umu.se/~flodin/
Room NADV 102
Department of Computing Science
Umeå University
S-901 87 Umeå, Sweden
--
"I must say that I find television very educational. The minute somebody
turns it on, I go to the library and read a book." -- Groucho Marx

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk