Boost logo

Boost :

From: bill_kempf (williamkempf_at_[hidden])
Date: 2002-01-31 10:05:12


--- In boost_at_y..., "Alisdair Meredith" <alisdair.meredith_at_u...> wrote:
> I'll second this!
>
> I am not an old-school C coder, never had to learn printf and
rigoroulsy avoid having anything to do with it. My brief dealings
found it far from intuitive and visually dense so I couldn't see the
wood for the trees.
>
> I'm also against *unnecessary* verbosity, and some of the iostream
stuff may be too far the other way but at least it is clear. When it
comes to trade-offs, I'll take clarity over terseness!

There are ways to make iostream usage more terse... such as defining
your own manipulators. If you need to format a number as hex, left
aligned in a 32 character column using capital hex digits, create a
manipulator that sets all of these in one fell swoop. It's really
not difficult, makes the code much easier to read then any printf()
statement, and gives you all of the benefits of iostreams (type
safety, user type I/O and formatting, locales with the ability to
expand for user types, etc.). I don't like the idea of grafting
printf style formatting onto iostreams, but we NEED a way to output
positional parameters.

Bill Kempf


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