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.5 required=5.0 tests=BAYES_00,INVALID_MSGID, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII 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: 10db24,30e368bdb3310fe5 X-Google-Attributes: gid10db24,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 From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763) Subject: Re: Hungarian notation Date: 1996/05/20 Message-ID: #1/1 X-Deja-AN: 155775812 sender: news@lts.sel.alcatel.de references: <4adem2$b5s@mercury.IntNet.net> <4ahka7$o9m@inrou.erno.de> organization: GABI Software, Sarl. newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.edu,comp.lang.eiffel Date: 1996-05-20T00:00:00+00:00 List-Id: In article tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya) writes: |> In article <319B2494.68AB@platsol.com> |> Dave Toland writes: |> DT: usage of the variables. And for C, it probably is not a "wrong" |> choice, particularly |> DT: when there are functions called without prototype declarations, |> and functions like |> DT: printf that cannot match the argument types to the formatting templates at |> DT: compile time. |> "cannot" is too strong. The C language clearly allows the compiler to |> know about standard library functions like printf. In fact at least |> one free compiler does check the arguments against the formatting |> directive, and more should do. This must be an amazingly brillant compiler, since the format strings are almost always the result of a call to gettext (or its equivalent on non-Unix systems), which means that they are read from an external file which generally won't even exist on the machine which is doing the compiling. Or does this compiler also know the semantics of gettext, and simply suppose that the translators won't screw it up. (Wishful thinking, of course. But I guess it really is too much to ask for a warning along the lines of: ``Warning: the translator who does the Estonian localization 5 years from now will accidentally change the %d into a %s.'') This isn't to say I approve of Hungarian notation, even in C and used with printf. Nor to criticize a compiler from generating a warning on obviously bad code. Just that this warning won't really be as useful as one would like in commercial software. -- James Kanze Tel.: (+33) 88 14 49 00 email: kanze@gabi-soft.fr GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France Conseils, �tudes et r�alisations en logiciel orient� objet -- -- A la recherche d'une activit� dans une region francophone