From: John Torjo (john.lists_at_[hidden])
Date: 2004-09-25 05:09:46
Reece Dunn wrote:
> 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:
>  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.
>  The direct result of not supporting  is that you cannot utilize
> Roland Richter's usage:
> std::list<char> cl = lexical_cast< std::list<char> >( "[ a, b, c ]" );
>  Input and output operations are symmetric operations. Why provide
> output for std::complex if you don't provide input?
When they're symmetric, I can use [serialize].
The thing is that when I want pretty output, I want your library. When I
do pretty output, I really don't expect to read it back.
For a lot of cases when I do pretty output, there is no safe way to read
-- John Torjo -- john_at_[hidden] Contributing editor, C/C++ Users Journal -- "Win32 GUI Generics" -- generics & GUI do mix, after all -- http://www.torjo.com/win32gui/ -- v1.4 - save_dlg - true binding of your data to UI controls! + easily add validation rules (win32gui/examples/smart_dlg)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk