From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,af40e09e753872c X-Google-Attributes: gidfac41,public X-Google-Thread: 109fba,f292779560fb8442 X-Google-Attributes: gid109fba,public X-Google-Thread: f8c65,30e368bdb3310fe5 X-Google-Attributes: gidf8c65,public X-Google-Thread: 1014db,30e368bdb3310fe5 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,30e368bdb3310fe5 X-Google-Attributes: gid103376,public X-Google-Thread: 1008e3,30e368bdb3310fe5 X-Google-Attributes: gid1008e3,public X-Google-Thread: 10db24,30e368bdb3310fe5 X-Google-Attributes: gid10db24,public From: Dave Toland Subject: Re: Hungarian notation Date: 1996/05/16 Message-ID: <319B2494.68AB@platsol.com>#1/1 X-Deja-AN: 155133573 references: <4adem2$b5s@mercury.IntNet.net> <4ahka7$o9m@inrou.erno.de> <4n6off$6e2@mikasa.iol.it> <3198F30F.2A2@zurich.ibm.com> content-type: text/plain; charset=us-ascii organization: Platinum Solutions mime-version: 1.0 newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.edu,comp.lang.eiffel x-mailer: Mozilla 2.01 (Win95; I) Date: 1996-05-16T00:00:00+00:00 List-Id: Keith Whittingham wrote: | And is absolutely horrible! It serves little purpose especially in the world of | C++ as we can invent our own data types and attempting to extend the convention | to include our newly defined types makes the code unreadable. | | In addition it makes it difficult to change a int to an unsigned int or to | a long without updating every occurence of the variable name in the code. Agreed! It runs entirely counter to the philosophies of data abstraction and object-oriented programming. Instead of concealing the details of data representation, it emphasizes them and nails them securely in place. I abhorred the notation when I first encountered it. On the other hand, it is widely enough used that it's a good idea to know a little about it. A good book on Windows programming using the API (I don't know if the MFC tends to use it) would probably have at least a cursory description of Hungarian notation. And in terms of readability (as opposed to maintenance), the type tags do give some indication of intended use of the variable, unlike variable names like 'q' or 'temp'. Hungarian notation evolved to fill a need. It is an attempt to force programmers to put meaning into the names of variables. It works, but the authors made the unfortunate choice of binding names to the representation as much as to the usage of the variables. And for C, it probably is not a "wrong" choice, particularly when there are functions called without prototype declarations, and functions like printf that cannot match the argument types to the formatting templates at compile time. -- We awe Fudd of Bawg. Wesistance is usewess. Pwepare to be assimiwated. Dave Toland Platinum Solutions, Inc. det@platsol.com