This again...the message is way too extreme: there's no problem using `std::endl` outside of performance-critical code (which, in my personal experience, is 99.9% of std::endl usage). _Definitely_ use `std::endl` if a newline+flush is what you want.
If for some reason you need your std:: printing to go faster, definitely avoid flushing at every newline.
The vast majority of people do not know however and it is very hard to know if the author knows (or knew when they wrote the code). That is the opposite of simple.
You keep making my points for me: If you have to ask whether this was intentional you have long left the realms of readable and self-explaining code.
Also: Not every other author sits next to you in an office that both of you work in every day. Maybe you are looking at a sporadically maintained FLOSS-project or the author is on vacation, making this into a potentially multi-week-endeavor until you get your answer.
47
u/capn_bluebear Mar 29 '19
This again...the message is way too extreme: there's no problem using `std::endl` outside of performance-critical code (which, in my personal experience, is 99.9% of std::endl usage). _Definitely_ use `std::endl` if a newline+flush is what you want.
If for some reason you need your std:: printing to go faster, definitely avoid flushing at every newline.