Hi,
My personal opinion is to use extends as seldom as possible - save it for when it actually gives you some functional advantage. Just because 2 objects have an x,y field does not necessarily mean they should share a common base type.
That said, if you're having to use a 'select/case' inside a method, this may be a sign that you should indeed be extending.
My personal opinion is to use extends as seldom as possible - save it for when it actually gives you some functional advantage. Just because 2 objects have an x,y field does not necessarily mean they should share a common base type.
That said, if you're having to use a 'select/case' inside a method, this may be a sign that you should indeed be extending.