Skip to main content
9 events
when toggle format what by license comment
Jan 24, 2017 at 7:27 comment added Adrian Iftode That's what my interviewer said about inheritance, but I didn't agree much with him, because what is missing here is the behaviour/implementation inheritance, unlike C++. I reviewed the Gamma et. all introductory chapter of their book and I believe the whole point is, like you said, the ability to substitute an object to another, so the clients don't depend on a particular object, but on interfaces. Interface in Gamma is different from the interface from C# or Java. Gamma considers the object's interface the totatity of its public methods. A type is a name to denote a particular interface.
Jan 23, 2017 at 23:17 comment added ctrl-alt-delor What you have there is often referred to as multiple inheritance (multiple interface inheritance in Java and C# as they don't have full multiple inheritance, I have not seem many languages that do full multiple inheritance properly). Polymorphism usually refers to multiple implementations inheriting from a single interface, to that one implementation can stand in for another.
Jan 23, 2017 at 19:40 vote accept Adrian Iftode
Jan 23, 2017 at 6:28 comment added Erik Eidt @gardenhead has a good answer. Also see en.wikipedia.org/wiki/Subtyping. Polymorphism in OOP is often referred to as inclusion polymorphism in broader contexts, because there are also other kinds of polymorphism.
Jan 22, 2017 at 18:19 comment added gnat God object?
Jan 22, 2017 at 17:13 answer added gardenhead timeline score: 3
Jan 22, 2017 at 17:05 review Close votes
Jan 24, 2017 at 21:49
Jan 22, 2017 at 16:53 history edited Adrian Iftode CC BY-SA 3.0
added 2 characters in body
Jan 22, 2017 at 16:43 history asked Adrian Iftode CC BY-SA 3.0