home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / next / programm / 7303 < prev    next >
Encoding:
Text File  |  1992-11-18  |  2.0 KB  |  46 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!abell
  3. From: abell@netcom.com (Steven T. Abell)
  4. Subject: Re: Coding Rules/Suggestions
  5. Message-ID: <1992Nov19.082837.3889@netcom.com>
  6. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  7. References: <1992Nov18.211313.25652@dtint.uucp>
  8. Date: Thu, 19 Nov 1992 08:28:37 GMT
  9. Lines: 35
  10.  
  11. nevin@dtint.dtint.com writes:
  12. >I've been the route of extremely strict conventions (see Charles  
  13. >Symoni, MIT/Microsoft on type naming calculus commonly referred to as  
  14. >"Hungarian"), and I find the middle ground more appealing (i.e. a  
  15. >'relaxed' but enforceable, democratic group of standards).
  16.  
  17. I use a Hungarian style similar to Symoni's. It was forced upon me against
  18. my will a few years back. Now, it seems to me to be a necessity. There are
  19. several concrete advantages, some of which are:
  20.  
  21. 1) Simpler semantics checking. You rely a *lot* less on your memory of
  22. what kind of thing a variable represents. Multi-level pointers become
  23. tractable. Mismatches between declaration and usage are visually apparent.
  24. Related entities are clearly related by similarity of names.
  25.  
  26. 2) Uniformity across a project. People tend to choose the same names for
  27. the same things, even when they aren't communicating.
  28.  
  29. 3) Name formation becomes much more mechanical. You can stop spending all
  30. day looking for good names for your variables, and expend your creativity
  31. in more valuable ways.
  32.  
  33. 4) Simpler, more reliable global search-and-replace. With the right set of
  34. naming rules, you can make some really scary name changes safely, and not
  35. take all day to do it.
  36.  
  37. 5) Code from code generators is more easily read by humans.
  38.  
  39. One of the greatest advances of the Industrial Revolutions was the idea
  40. of standardized, interchangeable parts. Object programming does this at
  41. a high level, Hungarian does it at a low level. Both matter.
  42.  
  43. If anybody out there hasn't seen this stuff and is interested, send e-mail.
  44.  
  45. Steve abell@netcom.com
  46.