[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java interface natural history was RE: "static" declaration





Ken Anderson wrote:

>>
>
> Are you saying that no body with experience with Common Lisp, said to 
> you something like "I miss multiple inheritance"?

This particular software system had no need of multiple inheritance. 
 Multiple inheritance
is a great way to deal with certain modularity needs.  We did not have 
those needs.
We didn't need a Runge-Kutte algorithm either; nothing wrong with R-K 
but it just
didn't come up in this particular project.

>   And nobody complained that they had to implement an interface 
> multiple times. 

Well, if there were two implementations that were entirely different, 
then there
was nothing to complain about. If there were implementations with code in
common, we made a base class and inherited from it.  People did complain,
as I say, about having to have an interface and also have a base class. 
 They'd
say, why can't we just make the base class be an abstract class and use 
that as
the type?  My answer: because someday someone might want to make an
implementation of this type that has no need to share any implementation 
with
the existing base class.

> My analysis of rt.jar was just an intro.  When i checked that i had 
> several hundred .jar files on my machine (many more than a year old), 
> i didn't want to analyze them all.
>
> I'm open to studying whatever jar's anyone suggests, I'm interested in 
> the natural history of real programs. 

Well, I'm not sure how much Java is written in the style that I 
advocate, i.e. a style that stresses
using interfaces rather than base classes as types.

>