home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / c / 11462 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  1.6 KB

  1. Path: sparky!uunet!mcsun!fuug!demos!kiae!glas!demos!zooid.guild.org!ross
  2. From: ross@zooid.guild.org
  3. Newsgroups: comp.lang.c
  4. Date: 18 Jul 92 03:11 MDT
  5. Subject: Re: Hungarian notation
  6. Sender: Notesfile to Usenet Gateway <notes@glas.apc.org>
  7. Message-ID: <1992Jul17.231117.15302@zooid.gui>
  8. References: <35240001@mechp05.uucp>
  9. Nf-ID: #R:mechp05.uucp:35240001:1992Jul17.231117.15302@zooid.gui:-1809532524:001:1166
  10. Nf-From: zooid.guild.org!ross    Jul 18 03:11:00 1992
  11. Lines: 33
  12.  
  13.  
  14. ross@zooid.guild.org (Ross Ridge) writes:
  15. >I rarely spend much time scratching my head wondering what the type of
  16. >variable is, and the odd time that I do, I'm wondering if it's a "struct foo"
  17. >or a "struct bar" something that Hungarian won't tell me.
  18.  
  19. stephen@eggneb.astro.ucla.edu (Stephen Schimpf) writes:
  20. >Why not? It is perfectly acceptable for you to come up with your own
  21. >prefixes. You are not limited to ones like "sz" and "b" or ones like
  22. >"hinst" or "hwnd" that Microsoft invented for Windows. If you make it
  23. >clear to other programmers reading your code (this includes you a few
  24. >months (weeks?) after you have written it) it will work.
  25.  
  26. How am I going to make an arbitrary, and probably ambigous list of hundred
  27. or so prefixes clear to anyone?  
  28.  
  29. >typedef struct tagFOO            // foo  <-- mention prefix here
  30.  
  31. If that comment is sufficient enough docomentation on the meaning of
  32. the new prefix then:
  33.  
  34.     struct tagFOO left;
  35.  
  36. is sufficient enough documention of the type of the variable defined.
  37.  
  38.                             Ross Ridge
  39.  
  40. -- 
  41. Ross Ridge - The Great HTMU                         l/     //
  42.                                     [OO][oo]
  43. ross@zooid.guild.org                            /()\/()/
  44. uunet.ca!zooid!ross                             db     //
  45.  
  46.