ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Re: [boost] Re: I/O library status
by Thomas Witt other posts by this author
Jun 3 2003 7:19AM messages near this date
[boost] Re: I/O library status | RE: [boost] Re: I/O library status
Hi,

On Monday 02 June 2003 19:21, Ed Brey wrote:
>  * newl differs from '\n' only in that newl doesn't perform background
>  formatting.  Presumably one would choose to use newl to avoid the
>  formatting.  What is undesirable about '\n' being formatted?

To me there are basically two reasons that make newl desirable beside the 
formatting issue.

1. std::endl was and is still abused heavily. I think there is a reason for 
this. Most c++ programmers are taught to stay clear of ugly low-level c 
things and to use the new shiny c++ facilities instead. And that's what they 
do, replace '\n' with std::endl. Personally I believe this reason alone 
justifies a std library extension std::newl.

2. IIUC the difference between a character and a manipulator is that the 
manipulator is not tied to the streams character type. So for some 
applications '\n' does not suffice. To me stream.widen('\n') is sufficiently 
ugly to justify a newl modifier. 

Thomas

-- 
Dipl.-Ing. Thomas Witt
Institut fuer Verkehrswesen, Eisenbahnbau und -betrieb, Universitaet Hannover
voice: +49(0) 511 762 - 4273, fax: +49(0) 511 762-3001
http://www.ive.uni-hannover.de

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Daryle Walker
Ed Brey
Ed Brey
Paul A. Bristow
Ed Brey
Thomas Witt
Paul A. Bristow

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved