this post was submitted on 05 Apr 2025
164 points (95.6% liked)

Programmer Humor

34850 readers
495 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 21 points 3 days ago (2 children)

They aren't the same thing so the comparison is weird.

endl has a flush which is important when doing something like embedded work or RTOS development. If i was doing multiple lines they all were \n until the last line when i actually want to push the buffer.

Obviously depending on the tuning of the compiler's optimization multiple flushes could be reduced but the goal should always be to write as optimal as possible.

[–] [email protected] 3 points 2 days ago

but the goal should always be to write as optimal as possible.

Within reason.

Over optimization is a curse on getting done.

[–] [email protected] 3 points 2 days ago (2 children)

Who in the hell is using iostreams in an RTOS

[–] [email protected] 1 points 2 days ago

Sometimes you work in a codebase that was decided on by others for reasons you don't know.

[–] [email protected] 1 points 2 days ago

Several. Probably dozens