32 ms·
The flipside is that its very easy for your library users write a new function that takes a Shape as a parameter. If you model things with a class hierarchy its
by ufo 12y ago
The flipside is that its very easy for your library users write a new function that takes a Shape as a parameter. If you model things with a class hierarchy its easy to add a new Shape subclass but you can't add any new methods to the Shape interface.