Source-Changes-D archive

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

Re: CVS commit: src/share/misc





On Sat, Aug 1, 2020, 6:26 PM Luke Mewburn <lukem%netbsd.org@localhost> wrote:
On 20-08-01 23:07, Taylor R Campbell wrote:
  | Index: share/misc/style
  | ===================================================================
  | RCS file: /cvsroot/src/share/misc/style,v
  | retrieving revision 1.56
  | diff -p -p -u -r1.56 style
  | --- share/misc/style        1 Aug 2020 02:45:35 -0000       1.56
  | +++ share/misc/style        1 Aug 2020 22:54:53 -0000
  | @@ -241,9 +241,8 @@ main(int argc, char *argv[])
  |                     errno = 0;
  |                     num = strtol(optarg, &ep, 10);
  |                     if (num <= 0 || *ep != '\0' || (errno == ERANGE &&
  | -                       (num == LONG_MAX || num == LONG_MIN)) ) {
  | +                       (num == LONG_MAX || num == LONG_MIN)) )
  |                             errx(1, "illegal number -- %s", optarg);
  | -                   }
  |                     break;

IMO, that example is a case in where if the style is "minimal braces"
that's still a good case to retain it. The if condition is across
multiple lines, and the brakes make it clearer (to me) where the statement
is.

This all comes down to a matter of style, where some people
prefer "purple" and some prefer "orange", yet the arguments are
often claimed to be (by all concerned) as "technical reasons".

I thought the only two color choices were green and purple given the Bab 5 heritage of the project...

Warner 

Anyway, I haven't got the motivation to bikeshed like this in NetBSD anymore.

Luke.


Home | Main Index | Thread Index | Old Index