On Sat, 9 Dec 2006 13:28:07 -0000, "Mark Rae" <ma**@markNOSPA Mrae.com>
wrote:
>"Registered User" <n4***@ix.netco m.comwrote in message
news:o9******* *************** **********@4ax. com...
>>>E.g. imagine a Customer class with a CustomerID property - what datatype
is
CustomerID ?
I dunno
Of course you don't...How could you...?
>it might be a value type instead.
Instead of what...?
Instead of a nullable datatype.
>
>Once I find out I won't need to be constantly reminded that CustomerID is
a
string or an int or even an object of type CustomerID.
LOL! Well, if you have a photographic memory, I certainly don't! Yes, once I
know it's an int or whatever, I'll retain that particular piece of
information for as long as I need to. But next week, next month, next year
when I come to revisit the code in response to a request for change or
whatever, I'll almost certainly have forgotten it again...
Myself as well but the time frame can be shorter. It never hurts to
review the code your going to touch. Part of the review is to refresh
the understanding of the existing design and code. The balance is to
consider and understand what changes are required and how those should
be accomplished. If this isn't done the programmer is just hacking on
the code trying to make 'it' (the desired changes) work.
>I find this ability especially helpful when working with generics.
Me too.
It doesn't take much to make CustomerID a generic.
public Customer<Custom erID>
{
public CustomerID CustomerID{...}
...
}
If this isn't riddle then this should be either
public Customer<Custom erID>
{
public int CustomerID{...}
...
}
>The question itself reads as if you are suggesting being consistant
and using hungarian notation in every scope.
I most certainly am.
>I agree, if hungarian notation is to be used at all, it should be used
everywhere so all consumers can receive all the supposed benefits.
I couldn't agree more!
I was trying to be tongue-in-cheek, not foot-in-mouth. My problem with
hungarian notation is it has never been used to describe public
properties that point to hungarian-notated private and protected
members. This inconsistancy and the fact there is no standard makes me
question the value of the whole process especially in this day and
age.
If hungarian notation works for you that is fine and dandy. We can
agree to disagree. Now step away from the computer and take the rest
of the day off. That is what I'm doing.
regards
A.G.