Date: Thu, 21 Jan 1999 07:51:46 +1100 From: Peter Jeremy <peter.jeremy@auss2.alcatel.com.au> To: cvs-committers@FreeBSD.ORG Subject: Re: -Werror Message-ID: <99Jan21.075110est.40345@border.alcanet.com.au>
next in thread | raw e-mail | index | archive | help
Robert Nordier <rnordier@nordier.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99Jan21.075110est.40345>