HN tends to lead to bad OO design.

> Sometimes one, sometimes many, ie. lpstrMyMessage.

MyMessage should offer a service, not a type. If it can be printed or
displayed, it should offer those services. Or - if really needed - provide
something like asString() or a string op (well, in C++ of course).

Cheers
Franz

"John Johnson" <jj5412 / earthlink.net> schrieb im Newsbeitrag
news:BB121DC5.4EA4%jj5412 / earthlink.net...
> on 6/15/03 12:47 PM, Yura at yura / opmr.com wrote:
>
> > You all know this already, but ...
> >
> >> -----Original Message-----
> >> From: Daniel Carrera [mailto:dcarrera / math.umd.edu]
> >> Sent: June 15, 2003 12:11
> >>
> >> I just looked up "hungarian notation" in microsoft.com.  I cam accross
a
> >> tutorial about it.  Here is a quote from it:
> >>
> >> This system became widely used inside Microsoft. It came to be known as
> >> "Hungarian notation" because the prefixes make the variable
> >> names look a
> >> bit as though they're written in some non-English language
> >
> > http://ootips.org/hungarian-notation.html
> > "Hungarian Notation - The Good, The Bad and The Ugly"
> > ...
> > Hungarian Notation (HN) is a naming convention invented by Charles
Simonyi
> > from Microsoft. (He is Hungarian)
> >
> >> That's about the only thing I agree with in that document.  My personal
> >> opinion is that hungarian notation produces the most unreadable code
> >> imaginable.  Sure, it produces tiny variable names, but since
characters
> >> are cheap, and human mental strain expensive, I think that one should
> >> minimize the mapping necessary between the human's brain and the code.
> >
> > I hate HN and never use it, but it has "nothing" to do with variable
names
> > per se.  Whatever name you decide to use for the variable you just
append
> > one letter in front of it denoting the variable type -- you can use
> > hMyWindowHandle instead of hWnd.
> >
> > Yura.
> >
> >
> Sometimes one, sometimes many, ie. lpstrMyMessage.
>
> It's like anything else, you could get used to it, and your brain would
> eventually not "see" the lpstr at the beginning, unless you needed to know
> it was a long pointer to a string.
>
> Also, the reason it is hWnd instead of something more verbose, is you have
> to type it over and over and over when writing Windows programs
>
> Having said all that, I much prefer The Ruby Way.
>
> --
> Regards,
>   JJ
>
> Finally using a Mac!
>
>
>