Boost logo

Boost :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2004-09-24 16:36:56


John Torjo wrote:
> Dear boosters,
>
> There's been quite a hot debate about "Output Formatters" library.
>
> Reece has provided some input facilies in this library as well.
> This has drawn people to either sides: some don't want these input
> facilities, while others do.
>
> To conclude, I would like to ask you to vote:
> - "Yes" - in favor of Input facilities
> - "No" - don't want Input facilities.
>
>
> My personal vote is "No".
> Please share your own.

I don't know if I am allowed to vote here, but I would like to point out
a few things:

[1] The library provides operator << (output) for STL containers. Thus,
you can do:

    ss << vec;

If input facilities were not provided, you couldn't do:

    ss >> vec; // oops! operator >> not defined for std::vector<...>

NOTE: You would then need to implement these facilities using
Boost.Spirit which will add a dependency on that library.

[2] The direct result of not supporting [1] is that you cannot utilize
Roland Richter's usage:

    std::list<char> cl = lexical_cast< std::list<char> >( "[ a, b, c ]" );

[3] Input and output operations are symmetric operations. Why provide
output for std::complex if you don't provide input?

Boost.Spirit does not provide output functionality because it is
designed as a lexer/parser implementation tool that are focused on input
processing only.

Regards,
Reece


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