General information
Category:
Object Oriented Programming
>I gotta back up Marty a bit here. While I don't necessarily completely agree with his solution, it does adequately reflect that to support polymorphism, you have to have some branch logic somewhere
Right, but I prefer the compiler/runtime take care of it. This simulates each object simply "knowing" what to do, when issued a polymorphic command. At the practical level (which is what really counts), those kind of switches are a maintenance burden that is best avoided.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only