CJCombrink commented on PR #2943:
URL: https://github.com/apache/thrift/pull/2943#issuecomment-1986266629

   (_Personally_)I don't think it is a matter of taste.
   `std::endl`'s claim to fame (if I can phrase it like that) is that it forces 
a newline and flush the stream.
   At some point in the past someone decided that the "flush the stream" is 
undesirable and _redefined_ `endl` to just force a new line.
   Thus the usage of `endl` enforces a known bad habit, or rather 
misplaced/misguided habit.
   The more appropriate thing to do at that time was make this change, instead 
of enforcing/entertaining/hiding a bad habit.
   
   I am also bringing up [C++ Core Guidelines 
SL.io.50](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#slio50-avoid-endl)
 (PS Which Bjarne 
[commented](https://github.com/isocpp/CppCoreGuidelines/issues/357#issuecomment-153515258)
 on himself).
   And then if you pay attention to the following comment on SL.io.50:
   > Note Apart from the (occasionally important) issue of performance, the 
choice between '\n' and endl is almost completely aesthetic.
   
   I would argue if it was only aesthetic why was the _overload_ added in the 
first place...
   
   PS: I am probably passionate about the wrong things, shoot down the PR if 
this is 'out of scope' for this repo


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to