KK> OOD, in this case, replaces the switch(){} construct
KK> with the built-in selectivity of function overloading.
KK> This enhances reusability and the ability to upgrade code.
KK> So switch(){}, while not exactly evil, is, in many instances,
KK> best left to the overloading function, rather than being
KK> hard-coded into your functions, limiting their usefulness and
KK> ultimately their reusability without being wholly rewritten.
That's supposed to be one of the advantages to OOP.
KK> In a single shot app where you just want it to work, the
KK> switch(){} is still fine, but if you want to make solid,
KK> OO code, then function overloading and specific data types
KK> is a much better choice.
KK> Is this a fairly accurate summary? :)
I think so.
--- Platinum Xpress/Win/Wildcat5! v2.0
---------------
* Origin: St. Louis Users Group (1:100/4)
|