[KLUG Programming] questions on picking data types

Robert G. Brown bob at whizdomsoft.com
Thu Jul 15 23:44:48 EDT 2004


On Thu, 15 Jul 2004 23:19:13 -0400, Andrew Thompson wrote:
>On Thu, 2004-07-15 at 13:15, Bruce Smith wrote:
>> I wonder what they'll the next time we run out of phone numbers? 
>> Add another digit or two?  That'll be fun, so plan for it now!  :-)
>I say we go to hexadecimal keypads and UUIDs. NOW!!!
>For a good time, dial c73bd185-dba9-4abe-99f3-a9aeea1f288d!!!

You two guys are almost as good as I am in making my point (maybe even
better! :).

If any phone number is an instance of a class (aka an object), we can 
do a really good job of dealing with phone numbers in all kinds of 
useful ways....

1. We seperate the data value from the data representation. We are 
   thus free to use any data representation we like, and represent
   it any way (or ways) we want.

2. We hide the actual nature of the data value, and protect it
   from all kinds of erroneous changes.

3. We can specify all the code that will work directly with that
   data, so it will be easier to preserve the integrity of the
   information, and ensure that the data value does not take on
   impossible values.

sounds pretty good, eh? It's what OOP really means, and it's often
not easyt work. On large, complex systems, it pays off.

						Regards,
						---> RGB <---


More information about the Programming mailing list