home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!convex!darwin.sura.net!wupost!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!ux2.cso.uiuc.edu!ejk
- From: ejk@ux2.cso.uiuc.edu (Ed Kubaitis - CCSO)
- Subject: Re: Perl language formatting conventions?
- References: <DAVE.92Aug25141544@pipi.iis.u-tokyo.ac.jp> <1992Aug25.152315.20630@news.eng.convex.com>
- Message-ID: <BtJux7.CEp@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: University of Illinois - Urbana
- Distribution: comp
- Date: Tue, 25 Aug 1992 17:22:17 GMT
- Lines: 34
-
- Tom Christiansen <tchrist@convex.COM> writes:
-
- |A friend of mine would like to see a style guide for Perl code
- |similar to the BSD KNF (Berkeley's Kernel Normal Form), which is
- |actually pretty much what I (and Larry) seem to use. I'm actually
- |trying to develop this, but it's not ready for publication yet.
-
- Although a minority in the Unix/C world, some of us have been indenting
- the trailing block delimiter the same amount as the block (instead of
- popping it out) since PL/I. I suppose the aesthetics of this style are
- more obvious with the typographically massive 'END;' of PL/I or Fortran
- 77's ENDIF & CONTINUE than with the minimal '}' of C and Perl, but we have
- been consistent in carrying a reasonable style forward through the years
- (decades actually;-)
-
- We despair of winning any converts from the style used in K&R (The C
- Programming Language), but we hope the Perl style guide is as tolerant
- in this regard as K&R themselves:
-
- The position of braces is less important; we have chosen one
- of several popular styles. Pick a style that suits you, then
- use it consistently.
-
- The second edition adds one clause:
-
- The position of braces is less important, >>>although people hold
- passionate beliefs<<<. We have chose one of several popular...
-
- For the widest acceptance the style guide probably shouldn't rush in
- where K&R feared to tread;-)
-
- ----------------------------------
- Ed Kubaitis (ejk@ux2.cso.uiuc.edu)
- Computing & Communications Services Office - University of Illinois, Urbana
-