2 ms·
The definition of good C code hasn't changed that much. API styles change and compiler capabilities change (gotta love C code with 7-character function names i
by dkarl 16y ago
The definition of good C code hasn't changed that much. API styles change and compiler capabilities change (gotta love C code with 7-character function names inherited from ancient Fortran code) but undocumented and disorganized is never good. I've used C APIs that were procedural with no OO influence at all, each function taking dozens of parameters, many of which weren't actually used because it was easier to pass the same thirty parameters to each function than to try to remember a unique parameter list for each function consisting of the seventeen parameters it actually needed. I've used APIs like that and groaned and cried and pulled my OO-educated hair out, but some of those APIs were still well-documented, logically arranged, and cleanly implemented, and they were a lot easier to use correctly than code written poorly in a modern style.