tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: Lockless IP input queue, the pktqueue interface



> I think that Mindaugas is being pragmatic here.  Developers are not
> equally brilliant[*], observant of the rules, or perceptive of the
> patterns, layers, or abstractions in the code.  He is writing the code
> in a way that discourages us from casually misusing or breaking it by
> getting under the abstraction.  I don't find that offensive.

i agree 100%.

infact, i spent a few weeks earlier this year making every struct
that isn't used as part of a direct interface (like, eg "struct tm")
in an program written in 1990 hidden inside the relevant source.
in the process i found about a dozen bugs, a couple that had
evaded me for quite a while, and introduced 4 that were fairly
quickly fixed.. (that i know about :-)

not *all* code can have structures hidden, but if it is easy to
do, it is almost certainly the right solution.  it encourages
modular code by giving you easy to see boundaries.  it shouldn't
be a hard-fast rule, which is why "pragmatic" is great way to
describe what rmind is saying.

regardless of how brilliant developers are, i want my code to be
written like this anyway.  it helps *everyone*.


.mrg.


Home | Main Index | Thread Index | Old Index