Lawrence D'Oliveiro a écrit :
> In message <[EMAIL PROTECTED]>, Wojciech
> Gryc wrote:
> 
> 
>>I'm a seasoned Java programmer and quite a big fan of interfaces...
>>i.e. The idea that if I make a number of distinct classes that
>>implement interface X, I can pass them all as parameters to functions
>>or whatnot that require an X object.
> 
> 
> Why?
> 
> Interfaces are just a euphemism for multiple inheritance,

Java's 'interface' mechanism is mostly a (somewhat weak & dumb IMHO) 
mean to decouple (sub)typing from implementation. Given a declarative 
static type system and the restriction to single implementation 
inheritance, of course. IIRC, vb6 had *no* implementation inheritance at 
all - you had to do 'implement' it by yourself, using (manual of course) 
delegation...

Now multiple inheritence is clearly not the answer to the OP's question 
in a dynamically typed language, where subtyping is not bound to 
inheritance.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to