Comment by quietbritishjim
2 days ago
That is a lot of words to say "none".
I have genuinely encountered problems due to traditional include guards: in a project I worked on, they had been copied and pasted to one of the headers without being changed properly, but not included in the same translation unit so it went undetected. I noticed it when I needed to use them differently, at which point I got a mysterious compiler error. Admittedly, that was easily fixed, but naturally I checked if a similar problem existed in other files and sure enough it did. Now I need to decide whether to fix all those too and where to draw the line. Time and mental energy wasted for no reason.
I don't want to hear about how extra tooling could have avoided the problem. Using pragma once would have avoided the problem! It's simpler, less effort in the first place, needs no extra tooling and works everywhere in practice.
No comments yet
Contribute on Hacker News ↗