2 ms·
The “duplicated” example seems to me to be similar to an inherited class. An abstract class defines the interface Rectangle, has resizeTopLeft, etc. and you imp
by chris_wot 5y ago
The “duplicated” example seems to me to be similar to an inherited class. An abstract class defines the interface Rectangle, has resizeTopLeft, etc. and you implement the interface.
It’s not duplication at this point.
edit: I’m an idiot. Perhaps not making it an abstract class. But it’s one of those examples where inheritance might actually help.