🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.eiffel
Article #1133

Re: Hungarian notation

#1133
From: Andy Armstrong
Date: Sat, 06 Jan 1996 17:28
39 lines
2395 bytes
In article <60KgWmb-3RB@herold.franken.de>, Joachim Durchholz
<jhd@herold.franken.de> writes
>andy@wndrwrks.demon.co.uk wrote 05.01.96 on Re: Hungarian notation:
>
>> In article <4cd8fc$oud@news.manawatu.gen.nz>, Chris Tutty
>> <ctutty@manawatu.gen.nz> writes
>>
>> Consider also that variable names may be misleading anyway. In that
>> sense there's no great difference between
>>
>>         someProc(MyString)
>>
>> and
>>
>>         someProc(pszMyString)
>>
>> either could quite happily refer to any other data type.
>>
>
>This example does not occur in real life. Or rather, it better should not!
>Anybody using meaningless names like "MyString" should be thrown out of  
>the programming business. Depending on the actual semantics of "someProc",  
>the parameter should be called "Message" or "Options" or "ParserInput" or  
>whatever.

The semantics of someProc might by that it's a function to reverse the
characters of a string in place in which case (psz)MyString would be a
quite reasonable argument name (albeit not one which I would use).

My intention was to draw attention to the fact that HN is a form of
documentation which in some ways is similar to indentation, choice of
variable names and use of comments; specifically, if you use names,
comments and indentation which don't accurately reflect what the program
does you are guilty of a crime which is not greatly different from using
HN incorrectly. Any redundant decoration which a language tolerates is
potentially misleading.

  Andy Armstrong                  WonderWorks
  Phone/fax: 01665 602868 Mobile: 0860 922719
Technical Details
Message-ID: <4OTVxAAPFr7wEw37@wndrwrks.demon.co.uk>
Path: arc1-ca.pugleaf.net!wndrwrks.demon.co.uk!andy
References: <30C40F77.53B5@swsbbs.com> <4behis$3cl@dux.dundee.ac.uk> <RIGOTTI.95Dec29100514@roach.dra.hmg.gb> <4cd8fc$oud@news.manawatu.gen.nz> <HtlknJAZAQ7wEwjl@wndrwrks.demon.co.uk> <60KgWmb-3RB@herold.franken.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!wndrwrks.demon.co.uk!andy
From: Andy Armstrong <andy@wndrwrks.demon.co.uk>
Newsgroups: comp.lang.eiffel,comp.lang.ada,comp.edu,comp.lang.c,comp.lang.c++,comp.lang.modula2,comp.lang.modula3
Subject: Re: Hungarian notation
Date: Sat, 6 Jan 1996 17:28:47 +0000
Organization: WonderWorks
Distribution: world
Message-ID: <4OTVxAAPFr7wEw37@wndrwrks.demon.co.uk>
References: <30C40F77.53B5@swsbbs.com> <4behis$3cl@dux.dundee.ac.uk>
 <RIGOTTI.95Dec29100514@roach.dra.hmg.gb> <4cd8fc$oud@news.manawatu.gen.nz>
 <HtlknJAZAQ7wEwjl@wndrwrks.demon.co.uk> <60KgWmb-3RB@herold.franken.de>
NNTP-Posting-Host: wndrwrks.demon.co.uk
X-NNTP-Posting-Host: wndrwrks.demon.co.uk
MIME-Version: 1.0
X-Newsreader: Turnpike Version 1.10 <qBJsdVzqmTD$H3HpwSrFWKs0Aw>