From owner-freebsd-current Fri Jan 29 08:33:49 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA05723 for freebsd-current-outgoing; Fri, 29 Jan 1999 08:33:49 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id IAA05713 for ; Fri, 29 Jan 1999 08:33:45 -0800 (PST) (envelope-from imp@village.org) Received: from harmony [10.0.0.6] by rover.village.org with esmtp (Exim 1.71 #1) id 106GUe-00066f-00; Fri, 29 Jan 1999 09:10:04 -0700 Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.1/8.8.3) with ESMTP id JAA66178; Fri, 29 Jan 1999 09:08:54 -0700 (MST) Message-Id: <199901291608.JAA66178@harmony.village.org> To: Andrew Kenneth Milton Subject: Re: btokup().. patch to STYLE(9) (fwd) Cc: current@FreeBSD.ORG In-reply-to: Your message of "Fri, 29 Jan 1999 21:21:55 +1000." <199901291121.VAA01208@zeus.theinternet.com.au> References: <199901291121.VAA01208@zeus.theinternet.com.au> Date: Fri, 29 Jan 1999 09:08:54 -0700 From: Warner Losh Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <199901291121.VAA01208@zeus.theinternet.com.au> Andrew Kenneth Milton writes: : The only arguments I've seen for less 'punctuation' are : : a) "I" don't need them : b) "I" don't like what it looks like with them : c) There might be bugs introduced due to parens. : : Well a and b are crap, and c is no worse off than we are now, since : there seems to be bugs caused by a lack of them. A and B aren't crap. Style(9) should allow extra parens in very complex situations, but still prohibit them in innane ones: if ((a < 0) && (b < 0)) should be prohibited since the designers of C anticipated this and made if (a < 0 && b < 0) do the right thing. The latter is easier on the eyes and uses the 80 columns better. I do agree that complex things like: if (a | b & c % d ^ e) should really have some parents to show what is going on. So I agree with phk on this one: Use fewer parens generally, but use common sense in adding them in the more obscure cases where they do legitimately add readability. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message