3 ms·
Yes, which is why I really like the idea of proactive enforcement with random expected-to-be-ignored tags/parameters. I'm arguing against the idea that leaving
by pdkl95 8y ago
Yes, which is why I really like the idea of proactive enforcement with random expected-to-be-ignored tags/parameters. I'm arguing against the idea that leaving out the last part of this
for (item = params->head; item; item = item->next) {
switch (item->type) {
case KNOWN_PARAM_TYPE_FOO:
// do normal stuff
break;
/* ... etc ... */
IGNORE_KNOWN_PARAM_TYPE_BAR:
// fallthrough - BAR explicitly uses default handling
default:
continue; // skip unknown parameters
}
}
is evidence of incompetence, not a strategy that will "make more profit than your competitor".
Also, as the BAR constant suggests, you probably already have code that skips unrelated fields. While the difference in programmer time is almost always trivially small, sometimes it might be zero.
- mathw 8y agoUnfortunately incompetence can sometimes lead to increased profits in the short term. Why else is there so much horrendous software out there?