Do you hate Hungarian Notation?
Printable View
Do you hate Hungarian Notation?
I find it very stupid, annoying and hard to read.
remember my old sig?
"A duck is a duck. There is no excuse for Hungarian notation."
Maybe I should use it again...
Ok have to ask. What the heck is Hungarian Notation?
it was a HORSE, not a duck!
lol...it was, wasnt? i cant even remember my own old sig correctly... :)
> What the heck is Hungarian Notation?
instead of declaring varbles like this
unsigned int *Whatever
you do this
unsinged int *dwlWhatever
It was created by microsoft to reduce errors. Can you see why no one likes it?
Hungarian notation:
HWND hwnd;
What it SHOULD be:
WINDOWHANDLE myWindowHandle;
Hungarian notation:
int __mf__dck_;
What it SHOULD be:
int Duck;
yeah, a horse... and who keeps so many exclusively-named variables in a block of code that they would need such a notation anyway!
Ok I understand what it is now. Thanks.
BTW
Its a piece of **** :)
>A horse is a horse.
Depending on your environment, a horse might also be a
COrse handle. Anyway, the only good reason for not using
it comes from adrianxw, who says todays IDEs will show
the datatype anyway in a tooltip text or similar.
"I don't like it" is not an excuse for larger programs in team
environments. If you create a class CProject, what do you think
how many myProjects will float around in such a project ?
Ever thought about what happens if you want to look for
instances of *your* myProject ? Goodbye SearchAndReplace or
even Find. Why not name it after what it is, projXXX ( where X
is the name ) ? There is a difference between lpszString and
strString.
It's a code. A standard. You don't have to follow it, but if all
in your team do, it really speeds up debugging.
>Hungarian notation:
>int __mf__dck_;
>What it SHOULD be:
>int Duck;
NO !
Hungarian notation of it would be
int nDuck;
I don't like it. I have always put a lower case p in front of pointers, and I tend to use a "h" in front of handles but that is it.
In the past there may have been a case for this kind of rubbish, but with todays IDE's, if I am not sure what type a variable is, I put my cursor over it, it tells me its type, offers to take me to it's declaration, and what it's current value is.
Shouldn't we be calling it Redmond notation? I think we do the
Hungarians a great injustice with this.
rick barclay
it is called Hungarian notation because it was invented by some guy at Microsoft who happened to be hungarian, I am currently at school, but this afternnon I can get the exact name of the guy
Oskilian