home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!decwrl!netcomsv!ulogic!hartman
- From: hartman@ulogic.UUCP (Richard M. Hartman)
- Newsgroups: comp.lang.c
- Subject: Re: Hungarian notation
- Message-ID: <142@ulogic.UUCP>
- Date: 22 Jul 92 23:14:55 GMT
- References: <1992Jul20.084316.15691@druid.uucp> <1992Jul20.220701.1095@trl.oz.au> <1992Jul20.224424.20551@aplcen.apl.jhu.edu>
- Organization: negligable
- Lines: 42
-
- I think a lot of the strength behind the Hungarian fetishists is
- the fact that the MS Windows calls and variables all use Hungarian
- notation.
-
- The concept of Hungarian (i.e. put a short prefix on variable names
- so that some sort of typing information is available when reading code
- without requiring the user to flip back four-or-five pages to find
- out whether "index" is an int or a char) is good, as long as it is
- consistantly used. I have seen some people imply that if you use
- Hungarian notation you can't make variable names that say what it
- is used for (a file position vs. some other type of int was mentioned).
- That is a ridiculous argument -- nFilePos vs nStudentCount -- there,
- it's been done. And using Hungarian yet!
-
- The problems I have with it are
-
- 1) people who want to use overly long "type" prefixes
- (e.g. "char charC, charInitial, charInput") This
- just causes a whole bunch of typing!
-
- 2) the lack of any one central reference standard, I have
- seen both "n" and "i" used as the prefix for integers,
- there has been talk of "sz" and "strz", and some old
- fashioned folks using "pc" for pointer to arrays of
- characters (strings). Some people like to add "a"
- for array (e.g. anChapters for an array of integer
- chapter numbers). It seems that any group of
- programers, once they agree to use the concept have
- to further agree on just what set of prefixes they
- will be using! (Of course, if there were a central
- reference, it would probably be Simyoni (sp?), and
- he favors the longer prefixes I already griped about
- in item #1! :)
-
-
-
- -Richard Hartman
- hartman@uLogic.COM
-
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- Disco isn't dead... ...it's just in witness protection!
-
-