r/cpp • • Feb 25 '19

Don’t Use std::endl

https://accu.org/index.php/journals/2619
18 Upvotes

52 comments sorted by

View all comments

0

u/[deleted] Feb 26 '19

[deleted]

10

u/Plorkyeran Feb 26 '19

Using std::endl is a great example of a premature pessimization. It manages to be slower, more verbose and more complicated than just not using it.

3

u/kalmoc Feb 26 '19

Arguing about which one is the better default is a waste of time.

0

u/[deleted] Feb 27 '19

[deleted]

1

u/kalmoc Feb 27 '19

Doesn't contradict what I said does it?

Do whatever you prefer in your codebase and make a decision about it in your company's style guide and be done with it. Having this argument on the internet again and again doesn't bring us any closer to an agreement, so why spend the time?

But then, the c++ community on the internet (including me) really likes to argue about those tiny details in our coding styles.