3 ms·
Admittedly I grew up after their introduction but I've always viewed the whining about overloading the shift operators quite pointless. Of all the things C++ a
by mhh__ 3y ago
Admittedly I grew up after their introduction but I've always viewed the whining about overloading the shift operators quite pointless.
Of all the things C++ annoys me with, I don't care that much about syntax.
- tomcam 3y agoMy guess is you never had to parachute into a project using operator overloading in strange, inconsistent, and undocumented ways with no original maintainers to show you the ropes
- mhh__ 3y agoAfter all it's impossible to do this with regular code
- amalcon 3y agoI actually like operator overloading, but overloading the shift operators for I/O was still a mistake IMO. It's a mistake even if you ignore that it's a theoretical misuse (I/O and binary shifting have nothing to do with each other semantically). The operator precedence of the binary shift operators is just wrong for I/O.