Re: [boost] Re: I/O library status

2003-06-05 Thread Thomas Witt

Daryle,

On Thursday 05 June 2003 01:28, Daryle Walker wrote:

 Actually, that reason isn't accurate.  The '\n' is an expression of
 type char, and all output streams can print a char object with operator
 , even if the stream's character type isn't char.  (The stream will
 secretly call the widen member function.)

Yep, you are right. This will tell me to stop talking about io issues from 
memory ;-).

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


RE: [boost] Re: I/O library status

2003-06-04 Thread Paul A. Bristow
I agree with these conclusions and strongly support the addition of newl.

Paul

Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB  UK
+44 1539 561830   Mobile +44 7714 33 02 04
Mobile mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]


| -Original Message-
| From: [EMAIL PROTECTED]
| [mailto:[EMAIL PROTECTED] Behalf Of Thomas Witt
| Sent: Tuesday, June 03, 2003 8:19 AM
| To: Boost mailing list
| Subject: 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
|
|


___
Unsubscribe  other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Re: [boost] Re: I/O library status

2003-06-03 Thread Thomas Witt

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