home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!snorkelwacker.mit.edu!ira.uka.de!ira.uka.de!slsvaat!josef!kanze
- From: kanze@us-es.sel.de (James Kanze)
- Subject: Re: Just what is so great about streams?
- In-Reply-To: tim@gold.iss.nus.sg's message of Thu, 12 Nov 1992 06:19:42 GMT
- Message-ID: <KANZE.92Nov13200446@slsvhat.us-es.sel.de>
- Sender: news@us-es.sel.de
- Organization: SEL
- References: <1992Nov12.061942.16473@nuscc.nus.sg>
- Date: 13 Nov 92 20:04:46
- Lines: 26
-
-
- |> This posting is a genuinely answer-seeking question,
-
- |> what _is_ so great about streams?
-
- I don't really like the syntax for streams either. In fact, I don't
- think many peoply do.
-
- We use them for two main reasons:
-
- 1. Type safety: There's no way you can do something like:
- printf( "%f" , 1 ) ;
-
- 2. Extensibility: How do you expand printf to handle user defined
- types.
-
- So we learn to live with the ungainly syntax.
-
- Does anyone know of a better way of handling IO formatting in a
- type-safe, extensible manner. It's too late to change the iostream
- syntax, but I am curious as to what the alternatives are.
- --
- James Kanze GABI Software, Sarl.
- email: kanze@us-es.sel.de 8 rue du Faisan
- 67000 Strasbourg
- France
-