Talk:Empty method over-rides

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(New page: I was just looking for people's opinions of this. Obviously empty methods are in general an indication of bad design, but they are tempting. What can be done instead? Are there situatio...)
 
Line 1: Line 1:
I was just looking for people's opinions of this.  Obviously empty methods are in general an indication of bad design, but they are tempting.  What can be done instead?  Are there situations where empty methods are okay?  Would it be appropriate if the empty method threw an exception?  This would still probably cause us to discard polymorphism, because we would have to check the instance type.  What solutions are there that would allow us to maintain polymorphism? --[[User:Aidan Bebbington|Aidan Bebbington]] 04:15, 1 August 2009 (UTC)
+
I was just looking for people's opinions of this.  Obviously empty methods are in general an indication of bad design, but they are tempting.  What can be done instead?  Are there situations where empty methods are okay?  Would it be appropriate if the empty method threw an exception?  This would still probably cause us to discard polymorphism, because we would have to check the instance type.  What solutions are there that would allow us to maintain polymorphism?  What principles or maxims are relevant here? --[[User:Aidan Bebbington|Aidan Bebbington]] 04:15, 1 August 2009 (UTC)

Revision as of 04:17, 1 August 2009

I was just looking for people's opinions of this. Obviously empty methods are in general an indication of bad design, but they are tempting. What can be done instead? Are there situations where empty methods are okay? Would it be appropriate if the empty method threw an exception? This would still probably cause us to discard polymorphism, because we would have to check the instance type. What solutions are there that would allow us to maintain polymorphism? What principles or maxims are relevant here? --Aidan Bebbington 04:15, 1 August 2009 (UTC)

Personal tools