Article View: comp.std.c
Article #4890Re: Prefixing functions with return type..
From: Steve Watt -- KD6GGD
Date: Thu, 14 Mar 1996 08:07
Date: Thu, 14 Mar 1996 08:07
27 lines
2001 bytes
2001 bytes
In article <4hstf8$jf3@cybernews.cyberus.ca> robert_mohid@cyberus.ca (Robert Mohid) writes:
>I've been recently told that the practice of prefixing functions to
>indicate return type (ie: int iGetInt(void) ) is "part of a new
>approach in progrmming". Can anyone confirm/deny this? I am extremely
>skeptical about that last statement, and to any who would reply
>*please* include some references as to make your claims as irrefutable
>as possible. Thanks in advance.
Well, it's a slightly newish thing. Microsoft decided to use it(*) in
their Windows code. Many (many many!) people think it makes the names
much harder to read -- if I wanted to look at names with lots of type
information in them, I'd look at the output of a C++ translator.
Allen Holub has a wonderful bit on Hungarian notation in his book "Enough
Rope to Shoot Yourself in the Foot" (ISBN 0-07-029689-8), rule number 44.1.
The basic part of the rule is "Do not clutter names with gibberish." The
details of the rule expand the definition of gibberish to include leading
weird type stuff, as well as starting pointer names with p.
(*)it == Hungarian Notation, after the native country of Microsoft's
head of programming, Charles Simonyi, who invented it. Holub also
explains why it is useful in one particular (assembly language) context.
--
Steve Watt KD6GGD PP-ASEL Packet: KD6GGD @ N0ARY.#NOCAL.CA.USA.NA
ICBM: 121W 56' 53.1" / 37N 20' 16.7" Internet: Home: {root,steve}@Watt.COM
"I am always ready to learn, although I don't always like being taught."
-- Winston Churchill
Technical Details
Message-ID:
<1996Mar14.080731.15076@Watt.COM>Path:
arc1-ca.pugleaf.net!in2.uu.net!bast!wattres!steveReferences:
<4hstf8$jf3@cybernews.cyberus.ca>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!in2.uu.net!bast!wattres!steve From: steve@Watt.COM (Steve Watt -- KD6GGD) Subject: Re: Prefixing functions with return type.. References: <4hstf8$jf3@cybernews.cyberus.ca> Organization: Watt Consultants, San Jose, CA, USA Message-ID: <1996Mar14.080731.15076@Watt.COM> Date: Thu, 14 Mar 96 08:07:31 GMT