[3745] in java-interest
Re: Fundamental flaw in Java library distribution scheme
daemon@ATHENA.MIT.EDU (Per Danvind)
Sat Nov 25 05:46:03 1995
To: david@longview.com, Jim.Graham@Eng.Sun.COM
Cc: java-interest@java.Eng.Sun.COM, flar@bendenweyr.Eng.Sun.COM,
wnj@sw.central.Sun.COM
In-Reply-To: Your message of "Fri, 24 Nov 1995 16:27:17 PST."
<9511250027.AA03708@bendenweyr.Eng.Sun.COM>
Date: Sat, 25 Nov 1995 10:24:20 +0100
From: Per Danvind <perry@cdt.luth.se>
Excuse me for disturbing your discussion, but here goes...
As in David's example, let's assume that we have a class C that
extends Object, and a class L that uses class C. Let's further
assume that class C does not define any equals() method, so a
call in L to C.equals() will call the inherited equals(Object obj)
from class Object.
David points out that if you change class C to include an
equals(C obj) method, but only recompile the C class, L will
still call the inherited equals(Object obj) from Object even if
the argument is a C object. That is until class L is recompiled
as well.
This is not wrong. Class L can't know that there now is a new
method in class C. Think about it. If you add a method to a class
C, wouldn't it be strange if classes using that class, suddenly
started calling this new method, without even being recompiled!?
--
Per
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com