home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / c / 19070 < prev    next >
Encoding:
Text File  |  1992-12-31  |  1.8 KB  |  40 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!mksol!mccall
  3. From: mccall@mksol.dseg.ti.com (fred j mccall 575-3539)
  4. Subject: Re: Function definition style
  5. Message-ID: <1992Dec31.140636.24072@mksol.dseg.ti.com>
  6. Organization: Texas Instruments Inc
  7. References: <1992Dec31.054359.13226@leland.Stanford.EDU>
  8. Date: Thu, 31 Dec 1992 14:06:36 GMT
  9. Lines: 29
  10.  
  11. In <1992Dec31.054359.13226@leland.Stanford.EDU> dkeisen@leland.Stanford.EDU (Dave Eisen) writes:
  12.  
  13. >>>I try to use the style in ansi k&r, but I notice that others are using this
  14. >>>style and I assume they aren't all using pre-ansi compilers.
  15. >>
  16. >>IMHO, one should be *very* careful in picking up coding habits from other
  17. >>programmers.  Often a programmer will use a particular feature or style
  18. >>out of laziness or ignorance of superior alternatives.
  19.  
  20. >Or for other perfectly valid reasons like portability. There
  21. >are still a fair number of folks left who use compilers that
  22. >don't understand prototypes.
  23.  
  24. >But Dave's point is valid. You shouldn't use a particular style
  25. >just because other programmers use it --- their needs may be 
  26. >different from yours so they may have chosen their style for
  27. >reasons that don't apply to you. 
  28.  
  29. Unless, of course, those other programmers are the other people on the
  30. same project you're working on, in which case a consistent coding
  31. style is a big win for maintainability of the final product somewhere
  32. down the road, since the maintainer will only have to get used to ONE
  33. arbitrary coding style instead of a dozen.
  34.  
  35. -- 
  36. "Insisting on perfect safety is for people who don't have the balls to live
  37.  in the real world."   -- Mary Shafer, NASA Ames Dryden
  38. ------------------------------------------------------------------------------
  39. Fred.McCall@dseg.ti.com - I don't speak for others and they don't speak for me.
  40.