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

If the .h file is documenting which other header files it needs, what keeps that documentation up to date. This sounds like a very painful way to work, where .h files fail to compile (with very strange error messages because of the way C++ works) and then you have to hunt down the missing dependency.


In my header libraries I have checks like this which produce a meaningful error message:

    #if !defined(SOKOL_GFX_INCLUDED)
    #error "Please include sokol_gfx.h before sokol_shape.h"
    #endif




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

Search: