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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: 1014db,30e368bdb3310fe5 X-Google-Attributes: gid1014db,public X-Google-Thread: f8c65,30e368bdb3310fe5 X-Google-Attributes: gidf8c65,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: peter@fourier.newcastle.edu.au (Peter Moylan) Subject: Re: Hungarian notation Date: 1996/05/23 Message-ID: <4o10dc$d7e@seagoon.newcastle.edu.au>#1/1 X-Deja-AN: 156260347 references: <31999F43.41C67EA6@scn.de> <319D2278.3F9A@netonecom.net> <4nr50r$jo2@ringer.cs.utsa.edu> <4nsgct$c3l@cville-srv.wam.umd.edu> followup-to: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.edu,comp.lang.eiffel organization: The University of Newcastle reply-to: peter@tesla.newcastle.edu.au newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.edu,comp.lang.eiffel Date: 1996-05-23T00:00:00+00:00 List-Id: Bob Rodgers (rsrodger@wam.umd.edu) wrote: >On the other hand, suppose one decided to change from a signed to >unsigned float? Or from an int to a float? Since I'm reading this in the Modula-2 newsgroup, I can't resist giving the obvious answer. (You'd probably get a similar answer from the Ada newsgroup.) The answer is that it's a non-problem, because (a) it's internal implementation detail, and the change would not even be visible in the client modules; (b) in the affected module there wouldn't be all that much to check and/or change, unless you depart from accepted good practice and start writing huge modules; (c) if all else fails, the error is going to be picked up by the compiler, at which point the necessary changes are obvious. Hungarian notation is an old-fashioned work-around for a problem in an old-fashioned language. The issue wouldn't even arise if people didn't insist on sticking to 20-year-old technology. Even in C, there wouldn't be much of a problem if programmers made sure that their names were tightly scoped. Anyone who creates a variable (or a type, or a procedure, etc.) that's visible over a wide scope is asking for trouble, and no amount of cosmetic massaging is going to remove the risk of disaster in such a case. And that's something that's been known for years. Anyone who's still writing code like that ought to be taken out and GPF'd. The real question is: why is this being posted to seven different newsgroups? It's very specifically a C problem, and has little relevance to the rest of us. -- Peter Moylan peter@ee.newcastle.edu.au http://www.eng.newcastle.edu.au/ee/Moylan.html OS/2 freeware list at http://www.eng.newcastle.edu.au/ee/Moylan/os2/os2info.html