Boost logo

Boost :

From: Keith Burton (kb_at_[hidden])
Date: 2002-01-22 01:06:51

Vote change to accept

I agree with the design process but disagree with the presentation which has
confused at least one potential user. Unless I am being even more stupid
than is usual, it will confuse other potential users.

I suggest that your format class is presented in the documentation as three
separate classes with only links to each other in the documentation :

    format_s :

            format using simple positional parameters e.g.
                    format_s( "French word order requires %1 before %2" ) %
"qazwsx" % "edccrfv" ;
                    format_s( "German word order requires %2 before %1" ) %
"qazwsx" % "edccrfv" ;

            stream manipulators are used for formatting e.g ....

    format_p :
( or pformat as you have it )

            format using Open Group printf style e.g. ....

    format :

            format using positional parameters with formatting information
e.g. ....

    This need not have a significant effect on the underlying

The str function : I have a opinion on the free function, I was surprised
and curious about the duplication. However it is important that the member
function exists.

Keith Burton

----- Original Message -----
From: "s_krempp" <krempp_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, January 21, 2002 2:04 PM
Subject: [boost] Re: Ongoing review of printf-like formatting

> > - The choice of formats is excessive, simple positional and Open Group
> > printf is sufficient to cover most needs. One can always revert to
> > when they are not.
> > If the %p.... formats really are needed then ( the documentation of ?)
> > management of the choices needs significant improvement.
> I hope the fault here is on the documentation..
> Well, I've written a new paragraph about the syntax design in
> please have a look and tell me at what stage of the decision process you
disagree with it.
> > - the code from 2002/1/20 does not compile with MSVC6SP5.
> rogeef sent detailed instructions on how I should modify the library to
make it compatible with MSVC, and I will follow those
> with great care.
> > - there are other issues which need fixing but would not prevent
> > e.g. the documentation at 2002/1/20 has a mixture of [] and % for
> > parameters
> I uploaded some 'fixed' version with too much precipitation.
> I have corrected these incoherences in my local files, and will upload
> everything shortly (once I implement the MSVC compatibility fixes)
> > Also why is str() a member function and a free function ?
> Many people ask this.
> I wanted it to be a member function (that's what it should be),
> but it's clumbersome to use in many cases :
> ( format( fstring) % x1 % x2 ).str()
> The free function approach is better here :
> str( format( fstring) % x1 % x2 )
> I can move the .str() code into the free function body,
> and simply use a friend declaration inside the format class.
> I did not know it was bad to provide a free-function that just
> calls the corresponding member function on the argument.
> Thanks for the comments,
> --
> Samuel
> Info: Send unsubscribe requests to:
> Your use of Yahoo! Groups is subject to

Boost list run by bdawes at, gregod at, cpdaniel at, john at