Boost logo

Boost :

From: Dave Steffen (steffend_at_[hidden])
Date: 2000-03-06 15:33:31


Dave Abrahams writes:
[...]
> P.S. Also, can't we do something about std::endl? This seems like
> way too many characters to type just to produce a newline!

to which Darin Adler replied

> I ignore std::endl except on the extremely rare occasions where I
> actually want "<< '\n' << std::flush".

Presuming everyone's read Scott Meyer's take on the endl thing
(<http://www.aristeia.com/Papers/C++ReportColumns/novdec95.pdf>), I
have several questions for the Boost group:

     A) do you think he's right,

     B) _if_ he's right, what should we do about it?

Personally, I've got a header file that has a bunch of nifty stream
stuff; the first line is something like

const char nl='\n';

which I then use thusly:

      cout << "First line" << nl << "Second line" << nl;

The name is highly debatable, of course. Seems to me like this is the
kind of thing that _everyone_ is going to do... differently. Perhaps
some discussion, followed by a (one line) Boost header file, would
lead to some standardization?

BTW I've got a lot of nits to pick with the stream library, too. But I
haven't thought most of them through far enough to actually propose
much of anything yet. ;-) ;-)

--------------------------------------------------------------------------
Dave Steffen Wave after wave will flow with the tide
Dept. of Physics And bury the world as it does
Colorado State University Tide after tide will flow and recede
steffend_at_[hidden] Leaving life to go on as it was...
                                                        - Peart / RUSH
"The reason that our people suffer in this way....
is that our ancestors failed to rule wisely". -General Choi, Hong Hi


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