OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   There is nothing wrong with MI (was Re: Schemata are not justconstraints

[ Lists Home | Date Index | Thread Index ]
  • From: Uche Ogbuji <uche.ogbuji@fourthought.com>
  • To: Danny Ayers <danny@panlanka.net>
  • Date: Fri, 29 Dec 2000 11:01:49 -0700 (MST)

> Just a comment on multiple inheritance - it can cause a lot of problems,
> especially where naming is important :  base classes with identical function
> names can get pretty confusing. The Java lobby have shown pretty well that
> m.i. isn't essential to an OO system (a Java class can only extend the
> functionality of one other class, but can implement any number of abstract
> interfaces) - if anything, removing it can make life easier.

Oh yeah?  Tell that to anyone who has had to use CORBA in Java.  Whenever
I hear people griping at how complex CORBA is, I laugh and show them a
typical Python CORBA program.  Ooooooh!  Where's all the complexity?  Try
doing _any_ sort of mix-in functionality in Java.  Now paste your hair
back on.

Lack of multiple inheritance is just one of the arms in the
straitjacket Java throws around developers.  Like it or not, there are
many more useful classification relationships than just interface
inheritance and implementation-sharing.  There are aggregation, interface
inheritance, implementation inheritance, delegation, environmental
acquisition, and others that I can't remember off-head.  Java allows only
one big hammer rather than all these fine tools.

C++'s problem was that it conflated interface with implementation
inheritance.  I'm not sure what Java's creators were thinking by
"solving" this by killing multiple implementation inheritance.  The
"diamond of death" is not caused by the evils of multiple inheritance.  It
is caused by programmers who don't understand
generalization/specialization.  I've never had a problem in C++ avoiding
the DoD using mix-in classes.

But let's not get me started on Java.  Nasty language.  Absolute scourge.
Then along comes Microsoft with C#.  I had honestly expoected better from
them.  But let's not get me started...


-- 
Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS