This is a nice solution, powerful and flexible, yet a little
expensive to use. Do not get me wrong here. OO (Object Orientation)
(And I am using it every day and will continue).
The question with OO is not "May I express this solution using
OO ?". Sure you can. The question is "Is this efficient ?". We
are not talking about runtime efficiency. Oversimplifying
one can say that if using OO to solve a given problem, we need
more line to sub-class a generic class than the class itself, we
are not winning.
Sub-classing introduce a lot of back and forth in the code. We have
to create a new classes and defines various member functions and
so on. Then in our application (lower in the source code if the
new class is small), we use the new class instead of the generic
OO has been very successful in project with lots of little
variations like widget sets for example. It is also very useful
to make some components much more easier to use: You create the
object, call various methods and destroy the object when you are done
and you do not care about all the initialisation details.
When you move to the left of the graph, resuable OO framework
are more difficult to express.