jacob navia wrote:
[...]
It is not to save keystrokes. It is for giving you the
flexibility of changing the "inheritance" path as requirements
change.
instead of
CustomerInfo->struct_a->struct_b->struct_c->CustomerBalance
you write
CustomerInfo->CustomerBalance
and you are free to REARRANGE the intermediate structures as you wish,
and as changing requirements need.
At the expense of maintainability, as you have hidden what, and where,
CustomerBalance is. I'd hate to have to search through who knows how
many header files, hoping to track down the path to CustomerBalance.
And, what happens when some structure, which is contained in some
structure, which is pointed to by another structure within CustomerInfo
adds a pointer to a structure which contains a pointer to a structure
which has a CustomerBalance member?
--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody |
www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net |
www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:
[email protected]>