Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


>The internals aren't revealed

They are when devs put all the code into those header files.


...does that happen? Outside of C++ templates or inlining is there a need to pollute the header file?


A 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: