, <tech-userlevel@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: tech-kern
Date: 03/22/2001 15:45:25
[ On Thursday, March 22, 2001 at 08:59:10 (+0100), Erik Bertelsen wrote: ]
> Subject: Re: a few minor cleanups to src/share/misc/style
>
> For NetBSD-specific userland programs the I see no real difference
> between using 0/1 instead of EXIT_SUCCESS/EXIT_FAILURE,
I see a huge difference in terms of typing (even with an abbrev in
emacs!).
In any case "exit(0)" and "exit(1)" are Unix (and C) idioms that
successful programmers need to understand implicitly regardless of what
NetBSD does and/or what any standards document coming down from on high
says.
But then I also get angry that some people find
* (p = f()) == NULL
* not:
* !(p = f())
to be more readable. I claim exactly the opposite. It's also a lot
harder to type.
This is equally blood-pressure raising for me:
* Don't use `!' for tests unless it's a boolean.
* E.g. use "if (*p == '\0')", not "if (!*p)".
The test *is* boolean, damnit! :-)
--
Greg A. Woods
+1 416 218-0098 VE3TCP <gwoods@acm.org> <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>