Re: Hungarian Notation
- From: "Wayne Niddery [TeamB]" <wniddery@xxxxxxxxxxxxxx>
- Date: Sat, 9 Apr 2005 11:37:53 -0400
Jim Cooper wrote:
>> To anyone reading your code, they *obviously* indicate type whether
>> you intend it or not.
>
> Arrrrrgh!!!!!!!!!! Get past the button example, OK. Look at the List
> one. I call all sorts of things lists that do not indicate the type.
Button is a perfectly good example, so is list.
> Please try and understand that my motivation for names is different
> than yours.
But the end result is the same (except in the cases where you *do not* add
the postfix).
>Descriptive names for variables (and functions and class
> and...) should always describe what the variable (etc) is.
Exactly, which we both do but in different ways.
> So it is
> natural to fairly often include what kind of thing it is you are
> talking about.
Which is what my prefixes also do.
> That is why it is so hard for you to tell the difference. But really,
> truly, I do **not** name things to indicate the type. I indicate what
> **kind of thing** they are.
Again this is no different *in nature* just in detail. You have given me an
example of where you do things a little more generically than me - using
"List" whether a collection or a visual control such as a listbox, whereas I
make the distinction between them - but that's just a *detail*. I'm also not
*literally* indicating *type*, otherwise I'd have to use different prefixes
for different *types* of button controls, I don't do that, a button is a
button - i.e. it is that *kind of thing*.
>> You are indicating the *nature* of the object
>
> Well yes, of course! That's key to good naming, surely? In the UI part
> of our code, we have fewer words to use. There are a lot of words to
> describe different sorts of people with using "person" in the name.
> There are not lots of words to describe different sorts of buttons, so
> we get back to using adjectives + "button" (and maybe other
> grammatical constructs)
Exactly, and instead of using "Button" at the end, I use "btn" at the
beginning. How on earth you can claim one or the other *superior* is beyond
me. Claiming that is is more "natural" to read is a red herring, otherwise
(as I've stated elsewhere), we would not use other abbreviations in English
such as "Mr"., and I *certainly* (in English) would not address you as
"Cooper Mister", but as "Mr. Cooper". Perfectly natural English.
Well, I think we've beat this one to death Jim, what do you think? <g>
--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
RADBooks: http://www.logicfundamentals.com/RADBooks.html
In a tornado, even turkeys can fly. - unknown
.
- Follow-Ups:
- Re: Hungarian Notation
- From: Jim Cooper
- Re: Hungarian Notation
- References:
- Hungarian Notation
- From: roman modic
- Re: Hungarian Notation
- From: Joanna Carter \(TeamB\)
- Re: Hungarian Notation
- From: Michael Stum
- Re: Hungarian Notation
- From: Jim Cooper
- Re: Hungarian Notation
- From: Wayne Niddery [TeamB]
- Re: Hungarian Notation
- From: Jim Cooper
- Re: Hungarian Notation
- From: Bryce K. Nielsen
- Re: Hungarian Notation
- From: Jim Cooper
- Re: Hungarian Notation
- From: Bryce K. Nielsen
- Re: Hungarian Notation
- From: Jim Cooper
- Re: Hungarian Notation
- From: Bryce K. Nielsen
- Re: Hungarian Notation
- From: Jim Cooper
- Re: Hungarian Notation
- From: Wayne Niddery [TeamB]
- Re: Hungarian Notation
- From: Jim Cooper
- Re: Hungarian Notation
- From: Wayne Niddery [TeamB]
- Re: Hungarian Notation
- From: Jim Cooper
- Re: Hungarian Notation
- From: Wayne Niddery [TeamB]
- Re: Hungarian Notation
- From: Jim Cooper
- Re: Hungarian Notation
- From: Wayne Niddery [TeamB]
- Re: Hungarian Notation
- From: Jim Cooper
- Re: Hungarian Notation
- From: Wayne Niddery [TeamB]
- Re: Hungarian Notation
- From: Jim Cooper
- Hungarian Notation
- Prev by Date: Re: Hungarian Notation
- Next by Date: Re: Bochs: is it usable in practice?
- Previous by thread: Re: Hungarian Notation
- Next by thread: Re: Hungarian Notation
- Index(es):