|
Boost : |
From: Karl Nelson (kenelson_at_[hidden])
Date: 2002-02-12 14:07:57
> On 2/11/02 2:19 PM, "Karl Nelson" <kenelson_at_[hidden]> wrote:
>
> > Hopefully we can keep a similar syntax between boost::format and
> > boost::legacy::format. Though I would still really prefer to make
> > a format which accepts printf and some extension like %{1:my_format_type}.
>
> The question this would raise for me is why we need to add another dialect
> to the printf world. For documentation and learning it might be nice to have
> something that has very few differences. Better than printf in many ways,
> without adding features other than those necessary to make it interoperate
> well with C++.
Both format2 and format3 can have fairly close compatiblity. Format2
has a bit more, but as a result the complexity goes way up. Printf
does a lot which iostream simply can't handle.
Should we just define a subset of printf which is common between
iostream and support that or graft a whole lot which is isn't?
Ie. truncation of strings is in printf but not iostream,
padding with 0 and show base are in iostream but do not interact
like printf. (00000x1 rather than 0x00001)
Is it acceptable to just make close to printf with well
documented differences or is strong compatiblity the best option?
It is my general feeling that grafting these features on is adding
things which istream itself should have. But does boost
really want to have its own non-standard iostream interface?
--Karl
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk