4 ms·
Observationally, C and related languages frequently use headers as a documentation and API specification point. The internals aren't revealed, but the expectat
by mjevans 4y ago
Observationally, C and related languages frequently use headers as a documentation and API specification point. The internals aren't revealed, but the expectations are distilled into one easier to reference location. I know I appreciate that more than machine (only) readable blobs that expect auto-doc tools to split out the salient information with the technical signatures. The human curation also allows for ordering that matters to organics who must integrate related data, rather than just alphanumeric enumeration.
- midoridensha 4y ago>The internals aren't revealed They are when devs put all the code into those header files.
- intelVISA 4y ago...does that happen? Outside of C++ templates or inlining is there a need to pollute the header file?
- midoridensha 4y agoA need? Definitely not. It's terrible practice. Does it happen? Absolutely, I've seen it many times. Why some C++ devs do this, I really don't know; I think it's just laziness.