Date: Thu, 28 Jan 1999 13:21:01 -0500 (EST) From: Alfred Perlstein <bright@hotjobs.com> To: Greg Lehey <grog@lemis.com> Cc: Bruce Evans <bde@zeta.org.au>, luigi@labinfo.iet.unipi.it, current@FreeBSD.ORG, peter.jeremy@auss2.alcatel.com.au Subject: Re: Nesting levels (was: indent(1) and style(9) (was: btokup() macro in sys/malloc.h)) Message-ID: <Pine.BSF.4.05.9901281315190.81323-100000@bright.fx.genx.net> In-Reply-To: <19990128202106.I8473@freebie.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 28 Jan 1999, Greg Lehey wrote: > On Thursday, 28 January 1999 at 20:39:03 +1100, Bruce Evans wrote: > >> See e.g. tcp_input.c ip_input.c and many network device drivers as > >> an example -- basically all places where, for efficiency reasons, > >> the code tries to expand in-line various block, the depth of > >> indentation pushes everything to the right end leaving only 20-30 > >> useful chars per line. > > > > See the Linux style guide > > Wave a red rag at a bull? :) > > (linux/Documentation/CodingStyle) for strong opinions about this: > > "if you need more than 3 levels of indentation, you're screwed > > anyway, and should fix your program". > > I think this is the bottom line. If you're using 8 character indents, > then yes, you're screwed. If you're using Microsoft and trying to > write clever shell scripts, you're screwed too. Your tools limit what > you can do. I believe that, in the matter of indentation, style(9) > limits legibility to a point where you really are screwed if you have > multiple indentation. But it's not because the code's bad. I really wish style(9) had some suggestions for configuring editors to make it easier to conform to the standards. Telling people "add this to your exrc/gvimrc/emacsrc" would help people trying to adopt the guidlines supplied in the manpage. Anyone want to commit thier editor's rc file to some place in /usr/share/examples? It'd be much appreciated. thanks, -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9901281315190.81323-100000>