I don't know about .Net, but since you say the question would be the same for Java streams, the most obvious pro- for C++ streams is that they have all the formatting built into std::ios. You can quite reasonably argue that this is orthogonal to the business of shunting bytes around, and therefore should be a separate concern. Then again C++ does separate the two, (see streambuf) it's just that the thing it happens to call a stream is the thing that also does the formatting, whereas Java calls the simple thing a stream, and then the programmer adorns it with with scanners, or readers, or whatnot.
As usual, Java provides a simple interface, C++ provides a "highly configurable and immensely powerful" interface which is kind of fiddly. Ease of use is not the only concern of the C++ standard committee.
As for why the committee hasn't provided a more Java-like alternative API, as Microsoft has done in .NET, I suspect:
- The committee prefers to let third parties do that kind of adaptor work.
- The committee likes many aspects of the current API, for example the all-purpose overloading of
operator<<
and operator>>
. I'm not sure whether this is part of what you dislike about C++ streams, but it's certainly part of what people who do like them, like about them.
Anyway there hasn't actually been a significant update of the C++ standard since it was first published, so even if the committee wanted a change (which it doesn't AFAIK), it would by now still only be in draft form, for release maybe this year, maybe next year.