Re: Multiple Inheritance



opalpa@xxxxxxxxx opalinski from opalpaweb wrote:
Tony Morris writes:
"Java has multiple inheritance. "

James Gosling (creator of Java) writes:
"Multiple inheritance--and all the problems it generates--was discarded
from Java. "
(from http://java.sun.com/docs/white/langenv/Simple.doc2.html#4090
atrributed to Gosling in table of contents
http://java.sun.com/docs/white/langenv/ )

Tony Morris writes:
" You might run into a common misunderstanding that
'inheritance' applies only to behaviour inheritance - and
the subsequent conclusion that Java does not support it. ... "


Bjarne Stroustrup (creator of C++) writes:
"If common data structures or operations are needed for implementations
they can be added in a base class that is visible only to implementers:

class common { // seen by implementers
// data
// functions
};

class my_implementation : public interface, protected
common {
// data
// functions
// overriding functions
};

class your_implementation : public interface, protected
common {
// data
// functions
// overriding functions
};

This is one of the simplest and most fundamental uses of multiple
inheritance."
(from http://www.gotw.ca/publications/c_family_interview.htm)


Tony Morris writes:
The sheep will follow...

The men who created the languages are the sheep? I don't think so.

OK, Tony, you do state that these ideas are "being propagated along
by marketers and/or Java language designers (who are distinct from
those
who research and understand language theory, etc.)."

So my noting Gosling and Stroustrup does not impress you. Fine. They
are not just language designers, however, they are also implementors.
They consider the reality of who programmers are right now and they
consider the realites of organizations that utilize programs. You're
touting the opinion of leisurely academics who do not consider such
things. Idealism and leisurely contemplation are fun, however some
take on the challange of reality -- making things work and progressing
in the more immediate term. I'm saying I respect your position, and it
is a welcome position for a discussion forum. I'm touting the
definitions and opinions of those who assist me in day to day practice.

Whose opinions do you like? Robert Harper
(http://www.cs.cmu.edu/~rwh/)? Are you a LISP programmer? An ML guy?

Anyway, my point is, Java, by common definition of
multiple-inheritence, by the established practical definition of
multiple-inheritence, does not have multiple-inheritence. So say the
creators (designers and implementors) of Java and other languages, the
millions of users, and most literature.

IFor example, under the aforementioned axioms, one
can disprove the legitimacy of the OO paradigm (as we know it, since it
has no formal definition).

The aforementioned axioms which you have nebulusly titled but failed to
list...

OO has legitimacy from me as it helps me pay bills.

In contrast, sound criticism permits you
to digress into further insights that you might have previously been
unaware of.

Kudos, I respect that. Please continue. You've an audience, of at
least one.

Good day mate,

Opalinski
opalpa@xxxxxxxxx
http://www.geocities.com/opalpaweb/


I think there is a misunderstanding - I am not touting the opinion of academics, and likewise, I will fervently defend the "realities of organizations" as legitimate within the context that we are discussing.

No, Stroustrup and Gosling do not impress me - we have moved on since then. Like many things, they set an excellent precedent (I am complementing Gosling here where it is most certainly unwarranted), being the best of the day, and I concede that Java still fits somewhere around "the best of the day". That it meets the "realities of organizations" is exactly the debate that I am engaged in. Simply, if you accept that the aforementioned (but not elaborated on as you picked up :)) Axioms of Software aligns with - as you put it - realities of organizations, then you also accept that Java (including the OO paradigm as we know it), and many other languages fall *far* short of meeting the requirement. In fact, I spend most of my development time conceding to, and working around, the many shortcomings as do others, only I observe them to attribute these workarounds to something else - sometimes even a "design pattern"!! How's that for marketing!?

Why is Java successful? Because it is a superior language? I can't help but view that answer as a mere subscription to the marketing material that I refer to. Externalise the perception (I admit, I once thought it as well!), place it under a heavy analysis (use whatever method you choose - they all derive the same conclusion), and then reconsider your position.

The crucial parts that I have omitted (and I acknowledge it) are the hitherto "axioms" and the logical steps to the conclusion. I'd be most interested in discussing the topic with interested parties, but engaging on public internet forums has proven fruitless in the past, so please accept my cowardly decline here.

Java has multiple inheritance until I see a sound proof to the contrary :) What the dieties say means nothing - not even asymptote zero. In fact, what is often touted by the Gods can often be used to shortcut conclusions to hypotheses by method of contradiction. Simply assume what is said is false, then try to prove it true. By doing so, you often inadvertantly prove the contrary. This requires much externalisation of what many (at least i have found) accept faithfully as truth. I also used this at my previous employer (a large corporation) who also engaged in portraying illegitimate forms of authority as a premise of truth. Suffice to say, there are related reasons that I left :)

--
Tony Morris
http://tmorris.net/

s/Commonwealth Games/Commonwealth Swimming
.



Relevant Pages

  • Re: Java and OOP
    ... And Java does not support multiple inheritance. ... So delegation is not an alternative to OOP, ...
    (comp.lang.java.programmer)
  • Re: Why multiple inheritance is not allowed in Java
    ... instead of C++ style of multiple inheritance??. ... and Interface not why Interface concept required in Java. ... Interface concept in Java. ... The Eiffel people came up with a fairly clean solution to the multiple ...
    (comp.lang.java.help)
  • Re: lines of code?
    ... > a) I should have qualified my statement about multiple ... > context of java gui; I'm no java expert, ... multithreading being "required" in Java is relevant, ... to unnecessarily implementing something as a state machine. ...
    (comp.programming)
  • Re: lines of code?
    ... > a) I should have qualified my statement about multiple ... > context of java gui; I'm no java expert, ... multithreading being "required" in Java is relevant, ... to unnecessarily implementing something as a state machine. ...
    (comp.lang.java.programmer)
  • Re: Multiple Inheritance In Java
    ... > cause multiple objects of Object to exist in the code which could be ... There are other approaches to multiple inheritance that don't use the C++ ... suspect that if Java had been defined to have MI, then the ... Java-like language that only allowed interface names to be ...
    (comp.lang.java.programmer)