home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / perl / 5472 < prev    next >
Encoding:
Text File  |  1992-08-25  |  2.0 KB  |  47 lines

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