Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've always thought of the stdlib overloading of << in streams to be, well, maybe not an abuse on the scale you see in the obfuscated C contests but at least a place where operator overloading makes code harder to read and understand.


Honestly, I can see why C++ overrode it in the first place though - does anybody really give a crap about the "<<" operator? Why does a language need to dedicate a whole operator to bitshifting?

I assume Stroustrup et al took a look at the meaningless "<<" and decided it was available for whatever use they saw fit.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: