3 ms·
Sather (1991) used operator overloading for output. And, even more hilariously, they overloaded + in the same way as C++ overloaded <<, giving you: #OUT + "
by int_19h 2y ago
Sather (1991) used operator overloading for output. And, even more hilariously, they overloaded + in the same way as C++ overloaded <<, giving you:
#OUT + "Hello, " + name + "!";
- tialaramex 2y agoI did not know this nor indeed that Sather existed. Thanks. I don't feel as though "But Sather did it too" counts as a good reason for I/O streams, but thanks for telling me.
- int_19h 2y agoI don't think it's a good reason, and FWIW I'm pretty sure they got the idea from C++ - iostream design predates ISO C++ by quite a bit. I remember seeing << for that with stuff like Borland C++ 3.1 that also originates in 90s, back when you had to write #include <iostream.h> etc. Just noting that this is not such an obviously bad idea that nobody else hasn't fallen into the same trap.