388 reputation
1312
bio website
location
age
visits member for 2 years, 6 months
seen Jun 3 '13 at 17:52

Apr
4
awarded  Famous Question
Feb
13
awarded  Good Question
Aug
12
awarded  Popular Question
Jan
24
awarded  Yearling
Oct
20
awarded  Notable Question
Sep
21
awarded  Custodian
Jun
4
awarded  Popular Question
May
11
awarded  Popular Question
Feb
27
comment Is this bad design for a Shape interface?
And that's a reason why the non-juniours shouldn't use it because....there is a high change of misuse. And this 'dogma' of disallowing implementation inheritance is advocated by some respected persons. Some programming languages consider it such as plague as to not even allow it, period.
Feb
27
awarded  Critic
Feb
27
comment Is this bad design for a Shape interface?
It is 'just data' for this simplified example. I will have to do validation on it e.g. ensure that the Shape's name has a certain length, ensure that line_width is not more than 10. So, it certainly is not a POD which you are implying!
Feb
27
comment Is this bad design for a Shape interface?
I'll look into that. One problem that comes to mind: what if there needs to be some validation in the future e.g. the name has to be at least 8 characters long? For this reason, I kept it as a method set_name(string).
Feb
27
comment Is this bad design for a Shape interface?
I had a feeling you were going to say that! However, inheritance is commonly misused, especially with junior programmers (there are many juniors on the team).
Feb
27
awarded  Commentator
Feb
27
revised Is this bad design for a Shape interface?
added 15 characters in body
Feb
27
comment Is this bad design for a Shape interface?
I mean no implementation inheritance. Edited the question.
Feb
27
comment Is this bad design for a Shape interface?
That's the requirement. And it's not stupid, considering the fact that it is usually abused. Of course, there are many arguments on both sides.
Feb
27
revised Is this bad design for a Shape interface?
added 213 characters in body
Feb
27
asked Is this bad design for a Shape interface?
Feb
17
comment Interface and Inheritance: Best of both worlds?
@MadKeithV and Gary, thanks.