[4406] in java-interest

home help back first fref pref prev next nref lref last post

Re: interfaces

daemon@ATHENA.MIT.EDU (Jeremy Fitzhardinge)
Fri Dec 22 04:56:16 1995

From: "Jeremy Fitzhardinge" <jeremy@suede.sw.oz.au>
Date: Fri, 22 Dec 1995 19:26:14 -0500
In-Reply-To: satoh-HAL-osamu <satoo@pfu.fujitsu.co.jp>
        "Re: interfaces" (Dec 22,  4:46pm)
To: satoh-HAL-osamu <satoo@pfu.fujitsu.co.jp>
Cc: java-interest@webrunner.neato.org

On Dec 22,  4:46pm, satoh-HAL-osamu wrote:
> I think, each class who implements multiple interfaces
> should provide ONLY ONE method for identical method
> prototypes. If one class can provide two or more method for
> one method prototype, it may require name resolution such
> likes C++'s one. And it makes Java a bit complex.

True, but Java already has some form of scope resolution (the
over-overloaded '.' operator).  While it may be painfully reminiscent
of C++, '::' (or some other unique token, but one may as well follow
precident) to unamigiously name things would have been a better choice
than '.'.

That aside, if you want to have a class which implements two
interfaces, and those interfaces happen to both have methods same
signature (and otherwise unrelated), you just can't do it.  You can
implement one, but not both, and I'm not sure if the spec says which
method will be implemented (perhaps both, which would be an awful
mistake).  You can rename one interface's method, but that may not be
possible, and is needless ugliness regardless.

	J
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post