3 ms·
In general, I find the stb libraries practical and technically excellent. I can't see how they could be improved by arbitratily splitting it into a header and c
by fsloth 11y ago
In general, I find the stb libraries practical and technically excellent. I can't see how they could be improved by arbitratily splitting it into a header and c-file.
Best practices are best practises within a specific usage domain. Sometimes the best solution to particular problem constraints is not the one that follows an orthodoxy.
"it will still cause duplicate compilation"
No, there is nothing in general that would cause this. The implementation is written behind a specific preprocessor condition which is not supposed to be a project wide definition.
For example user can write one stb-*-impl.c file that includes the header after the library specific preprocessor definiton.