|
|
|
|
|
by mikeash
4834 days ago
|
|
I don't really see the big advantage to << over named functions here. Compare: cout << string << " and " << otherstring << endl;
cout.write(string).write(" and ").write(otherstring).write(endl);
It's about as readable to me. To me, operator overloading is good when the meaning is already obvious because of shared context that everybody has. That's not the case when co-opting << for stream operators. |
|