On Mon, Mar 10, 2025 at 11:27:46AM -0400, Dan Cross wrote:
[snip] creates
pointless work for other people.
Along these lines, I can't stand when people write, `if (!strcmp(a,
b)) { /* strings are equal */ }`
While true, I find the negation particularly annoying in this context,
and prefer either `if (strcmp(a, b) == 0) { ... }` or writing a small
`streq()` function that returns boolean true/false.
From bitkeeper's style.h:
#define streq(a,b) (!strcmp((a),(b)))
and
#define unless(e) if (!(e))
Maybe I should post the whole file :-)