2 ms·
Quoting: "Header files. Wait, what?!? Yes, I prefer having header files to not having header files. A lot of programmers complain about maintaining header file
by scrubs 3y ago
Quoting:
"Header files.
Wait, what?!? Yes, I prefer having header files to not having header files. A lot of programmers complain about maintaining header files, but header files represent your API, so you're complaining about maintaining an API, which is not a good look, to be honest."
totally agree. I wanna see in one place the "API" namely:
- the name scope it's in
- the return, in, and out params
- description with explicit language on what's defined and undefined behavior in calling it
- in isolation without being blown away by the impl on first glance that's interspersed with the API.
Quoting further:
"If there's no distinction between your interface and your implementation, then your architecture is likely not great.""
Not sure about architecture, but good lord, programmers have to remember code is written to solve use cases AND be understandable by others. I want to read something written to be understood. I'm not interested in reading somebody's diary moonlighting as commercial code.