🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #280

Re: Multiple interfaces

#280
From: Tristan Reeves
Date: Mon, 17 Jun 2002 09:34
46 lines
3054 bytes
"Laurence V" <o@o> wrote in message news:3d0d962f.216399@news.clara.net...
> >Nothing in particular, it's a general observation related to custom
> >interfaces:
> >
> >interface Intf1{
> >    public void X();
> >}
> >
> >interface Intf2{
> >    public void X();
> >}
> >
> >class MyClass implements Intf1, Intf2{
> >    ????
> >}
>
> It just highlights the importance of choosing method names very
> carefully, especially so in interfaces.
>
> It does not highlight a major problem in the language, as you seem to
> suggest. In 6 years of Java programming I don't recall ever being
> faced with method name collisions due to implementing several
> interfaces.
>
>   L.
>
> ==
> Check out JINX - The Java Information Exchange, http://jinx.swiki.net

Of course it is an ugly problem in the language, even if not a show-stopper.

Just because you haven't encountered one doesn't mean there will never be a
name clash. It doesn't matter how carefully you choose your method names;
different domains use the same word for different concepts, besides which it
is ridiculous to have to tweak method names like "Open" or "Draw" - which
are perfectly fine - just because someone else *might* be using them. Trying
to puzzle out whether or not a given word is in use in some unknown
interface somewhere else on this planet is fruitless. At best you can hope.

Even if name-clashes are rare, it seems to me that there is just no good
reason why a name resolution technique could not have been implemented in
the language.

Regards,
Tristan.
Technical Details
Message-ID: <1024306483.86878@web.apex.net.au>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.cwix.com!news1.optus.net.au!optus!news.mel.connect.com.au!news.can.connect.com.au!not-for-mail
References: <1024283082.192985@web.apex.net.au> <JScP8.111$Fv1.17660@newsread2.prod.itd.earthlink.net> <1024289793.45649@web.apex.net.au> <3d0d962f.216399@news.clara.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,113f3357bc588129
X-Google-Attributes: gid10d6db,public
X-Google-Thread: f74b3,113f3357bc588129
X-Google-Attributes: gidf74b3,public
X-Google-Thread: 10a146,113f3357bc588129
X-Google-Attributes: gid10a146,public
X-Google-ArrivalTime: 2002-06-17 02:34:47 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.cwix.com!news1.optus.net.au!optus!news.mel.connect.com.au!news.can.connect.com.au!not-for-mail
From: "Tristan Reeves" <moonshine@apex.net.au>
Newsgroups: aus.computers.java,borland.public.jbuilder.java.language,comp.lang.java.programmer
Subject: Re: Multiple interfaces
Date: Mon, 17 Jun 2002 19:34:45 +1000
Organization: APEX Internet
Lines: 48
Message-ID: <1024306483.86878@web.apex.net.au>
References: <1024283082.192985@web.apex.net.au> <JScP8.111$Fv1.17660@newsread2.prod.itd.earthlink.net> <1024289793.45649@web.apex.net.au> <3d0d962f.216399@news.clara.net>
NNTP-Posting-Host: news.apex.net.au
X-Trace: auwa.connect.com.au 1024306483 6680 210.9.132.20 (17 Jun 2002 09:34:43 GMT)
X-Complaints-To: abuse@connect.com.au
NNTP-Posting-Date: 17 Jun 2002 09:34:43 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Cache-Post-Path: web.apex.net.au!unknown@210.9.133.145
X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/)