Why the streams in C++?
- by oh boy
As you all know there are libraries using streams such as iostream and fstream.
My question is:
Why streams? Why didn't they stick with functions similar to print, fgets and so on (for example)?
They require their own operators << and >> but all they do could be implemented in simple functions like above, also the function
printf("Hello World!");
is a lot more readable and logical to me than
cout << "Hello World";
I also think that all of those string abstractions in C++ all compile down to (less efficient) standard function calls in binary.