4 ms·
C++ did set a bad example with operator overloading. cout << "Hello World"; What the heck is that? Shift cout by "Hello World"? It looks like they did th
by J-Kuhn 6y ago
C++ did set a bad example with operator overloading.
cout << "Hello World";
What the heck is that? Shift cout by "Hello World"?
It looks like they did that just because they can.
- WalterBright 6y ago> It looks like they did that just because they can. The thing is, people thought it was a good idea at the time, and had good reasons. It took maybe a decade before experience showed otherwise. Even today it takes a while to convince newer programmers that it is indeed a bad idea, and even then they don't really believe it. An even more perniciously bad language feature is macros. I'm pretty sure that once I step down as D's BDFL or am forcibly removed D will get macros :-/
- slavik81 6y agoDoes this actually confuse anyone? There are plenty of problems with iostreams, but I have never been encountered an issue caused by the use of << for streams.