IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Re: Inheritance versus Interfaces...
I've always had a problem with the idea of multiple inheritances of classes when they overlap, and I like the way that Java deals with that - through Interfaces as opposed to Inheritance.

What do you do when interfaces overlap?
--
-- Jim Weirich jweirich@one.net [link|http://w3.one.net/~jweirich|http://w3.one.net/~jweirich]
---------------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
New Re: Inheritance versus Interfaces...
Use explicit naming like objvar.Interface1.do() and objvar.Interface2.do() ? Just a guess, I've never run into this problem.
New That's the basic of it.
It comes in handy when you have two Interfaces, both of which need to be implemented within a class, which share an overlapping function name. Admittedly, this will generally only happen if somebody's a piss-poor designer, but still, it's nice to have the functionality around.
"He who fights with monsters might take care lest he thereby become a monster. And if you gaze for long into an abyss, the abyss gazes also into you." - Friedrich Nietzsche
New Re: Inheritance versus Interfaces...
No, there is no clashing because the interfaces have no implementation code. So if a class implements two different interfaces, and both interfaces declare a "void run()" method, as long as you implement "void run()" you're OK.

     Inheritance versus Interfaces... - (inthane-chan) - (22)
         Well, being an Object Pascal user and fan... - (CRConrad) - (1)
             I could be wrong. - (inthane-chan)
         Re: Inheritance versus Interfaces... - (admin) - (6)
             Thane, read Gamma et al. "Design Patterns" NOW... - (tseliot) - (3)
                 Personally, I have (and prefer) the CD version of the GoF - (admin)
                 Right - (deSitter) - (1)
                     Er, what? -NT - (admin)
             Somewhat Glossed Over - (deSitter) - (1)
                 Don't pontificate - (admin)
         "no flame-wars"? .....party pOOper -NT - (tablizer)
         More mechanisms exist - (tuberculosis) - (7)
             Go for the XSL as a topic for sure. - (admin) - (6)
                 The problem right now... - (inthane-chan)
                 I'd love to hear them - (tuberculosis) - (3)
                     Couple of quickies: - (admin) - (2)
                         eXtensible Mangling Language - (static)
                         Heh - (deSitter)
                 That's how VB defines things... - (inthane-chan)
         Re: Inheritance versus Interfaces... - (JimWeirich) - (3)
             Re: Inheritance versus Interfaces... - (Arkadiy) - (2)
                 That's the basic of it. - (inthane-chan)
                 Re: Inheritance versus Interfaces... - (kelzer)

No, your ass does that all on its own.
84 ms