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: 109fba,f292779560fb8442 X-Google-Attributes: gid109fba,public X-Google-Thread: fac41,af40e09e753872c X-Google-Attributes: gidfac41,public X-Google-Thread: 1014db,30e368bdb3310fe5 X-Google-Attributes: gid1014db,public X-Google-Thread: 10db24,30e368bdb3310fe5 X-Google-Attributes: gid10db24,public X-Google-Thread: 1008e3,30e368bdb3310fe5 X-Google-Attributes: gid1008e3,public X-Google-Thread: f8c65,30e368bdb3310fe5 X-Google-Attributes: gidf8c65,public X-Google-Thread: 103376,30e368bdb3310fe5 X-Google-Attributes: gid103376,public From: simonh@ic.ac.uk (Dr S.J. Harris) Subject: Re: Hungarian notation Date: 1996/05/14 Message-ID: <4na2ur$gbl@oban.cc.ic.ac.uk>#1/1 X-Deja-AN: 154773644 references: <4ahka7$o9m@inrou.erno.de> <4n6off$6e2@mikasa.iol.it> <3198F30F.2A2@zurich.ibm.com> organization: Imperial College of Science, Technology and Medicine, London newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.edu,comp.lang.eiffel Date: 1996-05-14T00:00:00+00:00 List-Id: In article <3198F30F.2A2@zurich.ibm.com> Keith Whittingham writes: >Roger Merritt wrote: >> >> Franz.Kruse@erno.de (Franz Kruse) wrote: >> >> >Could someone please post an article describing Hungarian Notation in some detail >> >and giving examples? >> >> >Thanks, >> >> >Franz >> >> The idea is that you include information in the name of the variable >> to help you remember the type. So a pointer to a char might be named >> cpCurrent. >> >> Same thing applies to function names to help you remember the type >> returned. >> > > >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. > Isn't that supposed to be one of the 'good features' of Hungarian notation. That it forces you to go through your code and check at each occurrance that your change of type is not going to have any nasty effects. (Unless, you're lazy and do a global search and replace ;^) By the way, I hate Hungarian notation too. I like symbol names that I can read out aloud if necessary. > >-- >Keith Whittingham >wgk@zurich.ibm.com Simon J Harris (s.j.harris@ic.ac.uk)