Alternately, use a dynamically typed language like Python, where interface implementation is implicit. That is, if you make three classes with the same methods that expect the same arguments, then they''re already interchangeable.
Plus, because classes themselves in Python are objects, then making templates is trivial. That''s always a feature I would''ve loved in C++ (treat classes as objects, and thus you could make classes implement an interface, and thus design your template class around this interface).
On Multiple Inheritance and Design Issues (controversy!)
quote:
I don''t even really like *single* inheritance, let alone multiple inheritance.
Then what tangible advantage does OOP offer over functional paradigms? You get a slightly more "logical" layout to your program, but you''re really not doing anything that couldn''t be done (and possibly done easier) in a functional language.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement