From owner-freebsd-hackers Tue Sep 19 12:03:42 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA24377 for hackers-outgoing; Tue, 19 Sep 1995 12:03:42 -0700 Received: from rocky.sri.MT.net (sri.MT.net [204.94.231.129]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id MAA24368 for ; Tue, 19 Sep 1995 12:03:38 -0700 Received: (from nate@localhost) by rocky.sri.MT.net (8.6.12/8.6.12) id NAA25538; Tue, 19 Sep 1995 13:05:33 -0600 Date: Tue, 19 Sep 1995 13:05:33 -0600 From: Nate Williams Message-Id: <199509191905.NAA25538@rocky.sri.MT.net> To: Terry Lambert Cc: nate@rocky.sri.MT.net (Nate Williams), davidg@root.com, hackers@freefall.freebsd.org Subject: Re: Coding style ( was Re: why is this not a bug in namei?) In-Reply-To: <199509191852.LAA10314@phaeton.artisoft.com> References: <199509190433.WAA24091@rocky.sri.MT.net> <199509191852.LAA10314@phaeton.artisoft.com> Sender: owner-hackers@FreeBSD.org Precedence: bulk Terry Lambert writes: > > > 9 items in short term memory simultaneously. That would be why phone > > > numbers are 7 digits. > > > > > > I'm not even taxing the low end of the study participants. > > > > What this has to do with you using goto's I have no idea. > > It shows that David's complaint about 3 goto's is religious, and not as > he said a result of battling obfuscation. Huh, you lost me here. > > > On the other hand, if I want block profiling without having to rewrite > > > the compiler, then I have to add a block start on function entry and > > > one on every function exit. If there is one function exit, then I > > > have to add one. > > > > Again, what this has to do with you using goto's I have no idea. > > Getting to the one function exit the way the BSD code is currently > written requires a goto. If the code *needs* to be written that way, then I can see your point, but I don't see that as part of KNF. The only thing even mentioning exits implies that you can have multiple exits in any function. I quote: /* * Exits should be 0 on success, and 1 on failure. Don't denote * all the possible exit points, using the integers 1 through 300. */ exit(0); /* Avoid obvious comments such as "Exit 0 on success." */ > > A rule enforced in all software houses I've worked in. "Programmers who > > use gotos will be publically ridiculed" > > I look forward to your and David's patches to the following functions, > and to the functions not in these two subdirectories that have the same > "goto infestation problem": AFAIK, we are discussing new code re-writes, not changing already existing code. Re-writing all of the existing code is a worthy task, but there are much worthier tasks that need to be done. Nate