From owner-freebsd-current Fri Jan 29 10:23:43 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA21596 for freebsd-current-outgoing; Fri, 29 Jan 1999 10:23:43 -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 KAA21585 for ; Fri, 29 Jan 1999 10:23:37 -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 106IFf-0006EK-00; Fri, 29 Jan 1999 11:02:43 -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 LAA67403; Fri, 29 Jan 1999 11:02:49 -0700 (MST) Message-Id: <199901291802.LAA67403@harmony.village.org> To: Julian Elischer Subject: Re: btokup().. patch to STYLE(9) (fwd) Cc: current@FreeBSD.ORG In-reply-to: Your message of "Fri, 29 Jan 1999 09:48:19 PST." References: Date: Fri, 29 Jan 1999 11:02:48 -0700 From: Warner Losh Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG : If I were working on this code written by someone else it'd leave my : editor looking like the top example, that's for sure. I think that : "How easy is it to edit a piece of code and still have it do what you : expect" is an important consideration, because people DO edit things. Agreed. : > I do agree that complex things like: : > : > if (a | b & c % d ^ e) : > : > should really have some parents to show what is going on. : : I have NO idea of what that is doing and I have plans of looking it up in : the book to work it out.. Yes. I agree with that. if (a | b & c % d ^ e) should have been written as: if (((a | (b & (c % d))) ^ e) != 0) (then again, either way it is ugly code and should have comments). : OK so where is the line.. I find that in code I'm working on I have many : more : arens that you would like.. : does that mean that I should be forced to take them out when I commit it : and therefore probably produce erorrs? No. Style(9), imho, is more a guide than a hard and fast thou shalt in all cases. I don't think that you should do anything to increase errors. I would say that if you are adding/editing code to a moudle, you shouldn't go messing with what is there. If you are writing new code, then do what will make the code most reliable. If you did extensive testing with parens, think twice about removing (and vice versa). As a friend of mine put it: "You can't legislate common sense." Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message