From owner-cvs-all Wed Jan 20 12:52:07 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA16925 for cvs-all-outgoing; Wed, 20 Jan 1999 12:52:07 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA16920 for ; Wed, 20 Jan 1999 12:52:05 -0800 (PST) (envelope-from peter.jeremy@auss2.alcatel.com.au) Received: by border.alcanet.com.au id <40345>; Thu, 21 Jan 1999 07:51:10 +1100 Date: Thu, 21 Jan 1999 07:51:46 +1100 From: Peter Jeremy Subject: Re: -Werror To: cvs-committers@FreeBSD.ORG Message-Id: <99Jan21.075110est.40345@border.alcanet.com.au> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk Robert Nordier wrote: >[style(9)] actually says, "Don't use parentheses unless they're required >for precedence, or the statement is really confusing without them." :) IMHO, this is a bug in style(9) :-). The example given: a = b->c[0] + ~d == (e || f) || g && h ? i : j >> 1; should rate as an entry in the Obfuscated C competition rather than an example of maintainable code. I agree that the kernel is written in C and not Lisp, but extraneous (from the compiler's perspective) parenthesis (and braces) can significantly enhance comprehension. Remember that the code you're writing has to be maintained for many years - and the maintainers will not always have your in-depth expertise. The code also forms a `reference implementation' for someone who wants to do something similar. Peter -- Peter Jeremy (VK2PJ) peter.jeremy@alcatel.com.au Alcatel Australia Limited 41 Mandible St Phone: +61 2 9690 5019 ALEXANDRIA NSW 2015 Fax: +61 2 9690 5982 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message