2019-03-26, 18:17:58 +0000, Al Viro wrote:
> Dumping everything into widely-included files is a Bloody Bad Idea(tm);
> it makes reasoning about the code much harder.
> 
> If anything, we should trim the hell out of those; details that matter
> only to a well-defined subset of the kernel should be local to it.
> Consider, for example, include/net/af_unix.h.  The stuff defined in
> there:
> 
[snip example]
> 
> Dumping internal details into include/* makes life much harder
> when working with the code, trying to understand it, etc.
> The usual reasons to separate interfaces and internals do
> apply in the kernel.
> 
> Note, BTW, that stale junk (extern for a function removed at some
> point, etc.) tends to stay around, confusing the hell out of readers.
> And include/* tends to be considerably more sticky in that respect.
> 
> The bottom line: keep public headers tidy; internal details belong
> with the code working with those.

Uh, yeah, makes sense. Thanks for the detailed example, I didn't think
the include/* situation was that bad.

-- 
Sabrina

Reply via email to