News for hackers. Stuff that matters.
Re:Clang Format Tanks Performance by emmelaich on Tuesday November 19, 2019 @09:41PM (#21580658)
I think clang-format is definitely relevant; the take-away here is that no formatter should change the order of includes.

I was wondering about this only yesterday - tidying up some C++ and C code. I don't remember any standard that says it's OK to re-order headers, and clearly it can matter a lot.

Re:Clang Format Tanks Performance by BeeOnRope on Tuesday November 19, 2019 @09:43PM (#21580671)
That wouldn't be my take away.

My takeway would be anything that changes in semantics or performance due to header includes should be considered a bug by the (possibly joint) writers of the involved headers.

clang-format is an innocent victim here. Maybe I should make that clearer.

Re:Clang Format Tanks Performance by flukus on Tuesday November 19, 2019 @10:05PM (#21580772)
Clang isn't the root cause, but as a (relatively) new tool in an existing ecosystem it needs to work with the existing ecosystem and not some imaginary idealistic world.
Re:Clang Format Tanks Performance by mypalmike on Wednesday November 20, 2019 @01:21PM (#21586704)
Changing semantics due to header order is considered a feature in C/C++. If you aren't willing to waste hours working through esoteric header issues, you just aren't tough enough.