110 reputation
4
bio website
location
age
visits member for 3 years, 4 months
seen Dec 10 at 10:32

Oct
12
accepted OOD: class hierarchy with method arguments forming another hierarchy
Jul
29
comment OOD: class hierarchy with method arguments forming another hierarchy
@Euphoric I guess you haven't seen the notification about my comment to your answer -- could you please take a look at it?
Jul
28
comment OOD: class hierarchy with method arguments forming another hierarchy
hmm, it worked -- big thanks! I was surprised it worked though. Aren't constructors just a methods LSP is applied to? Why constructors can be non-polymorphic? And concerning the first part -- about hierarchy as well -- here it is: pastebin.com/ucya1iRH (scala) and pastebin.com/fJyTRVBv (php) Did I get it right?
Jul
28
comment OOD: class hierarchy with method arguments forming another hierarchy
@Euphoric I know how polymorphism works. I indicated problems that arise when coming up with this class structure. I'm not defending it -- oppositely, I'm trying to find another, proper one. The common problem is the following, again: some objects that (seem to) form a class hierarchy do something with (or with the help of) other objects that (seem to) form a class hierarchy as well. I.e., the more specific is the handler class, the more specific class it handles.
Jul
28
comment OOD: class hierarchy with method arguments forming another hierarchy
@Euphoric sorry for not answering your first comment right away. If there was another child class D that would derive from B, it would never accept C' as argument -- it would accept D'.
Jul
28
comment OOD: class hierarchy with method arguments forming another hierarchy
@dbc No, only B can process B'. Class A contains logic that is common for all its child classes, but nothing specific for some of its child classes. So I'm sorry for my previous comment -- any of them possibly can be abstract (but it just not my current case, that's why I told that all of them are concrete).
Jul
28
comment OOD: class hierarchy with method arguments forming another hierarchy
@Euphoric I wanted to outline a problem that I encounter quite often: some objects that (seem to) form a class hierarchy do something with (or with the help of) other objects that (seem to) form a class hierarchy as well. I.e., the more specific is the handler class, the more specific class it handles. I agree that I possibly approach the problem from the wrong way. But way is better?
Jul
28
comment OOD: class hierarchy with method arguments forming another hierarchy
@dbc All of them are concrete classes.
Jul
24
asked OOD: class hierarchy with method arguments forming another hierarchy
Mar
24
awarded  Student
Jan
28
awarded  Editor
Sep
12
asked raw aql query in framework with Active Record pattern based ORM
Apr
6
awarded  Scholar
Apr
6
comment Interfaces: profit of using
I would miss this one the most, so I accept it. Anyway, other answers are great either. Thank you all guys.
Apr
6
accepted Interfaces: profit of using
Apr
4
comment Interfaces: profit of using
The first part of your comment implies that interfaces are a good choice for Strategy pattern, or any other that uses polymorphism, right? I am just trying to structure interface use cases, so Polymorphism is one of them, as @java_mouse mentioned.
Apr
4
awarded  Supporter
Apr
3
asked Interfaces: profit of using