r/C_Programming • u/Yuki_pop • 27d ago
Could someone explain the practical differences between #pragma once and traditional include guards (#ifndef, #define, and #endif)?
84
Upvotes
r/C_Programming • u/Yuki_pop • 27d ago
View all comments
1
u/EternalDoomSlayer 24d ago
I think the question has been answered, reading guards isn’t the biggest problem, however since we’re in C world, let’s not overcomplicate by having to interpret pragma.
C is such a damn good language (excuse my English) because you don’t have 25 different types of sugar! The above mention about pragma - is it supported or…. Where’s the quirk? This leads me to:
"Any problem in computer science can be solved with another level of indirection"