Article View: aus.computers.java
Article #281Re: Multiple interfaces
From: Mark Thornton
Date: Mon, 17 Jun 2002 09:56
Date: Mon, 17 Jun 2002 09:56
34 lines
2689 bytes
2689 bytes
"Tristan Reeves" <moonshine@apex.net.au> wrote in message news:1024306483.86878@web.apex.net.au... > > > 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. > > I agree with Laurence that this is only a minor problem (and in practice a very rare one at that). This is partly because a clash only occurs if the method name AND signature match. So in the rare cases that a clash does occur we have to use delegation. I think this is quite a small price to pay for avoiding the extra complication of name resolution. With a reasonable JIT the run time cost of delegation is negligible. Mark Thornton
Technical Details
Message-ID:
<3d0db19e$0$7200$afc38c87@news.easynet.co.uk>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!colt.net!diablo.netcom.net.uk!netcom.net.uk!easynet-monga!easynet.net!easynet-post1!not-for-mailReferences:
<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> <1024306483.86878@web.apex.net.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,113f3357bc588129 X-Google-Attributes: gidf74b3,public X-Google-Thread: 10a146,113f3357bc588129 X-Google-Attributes: gid10a146,public X-Google-Thread: 10d6db,113f3357bc588129 X-Google-Attributes: gid10d6db,public X-Google-ArrivalTime: 2002-06-17 02:56:04 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!colt.net!diablo.netcom.net.uk!netcom.net.uk!easynet-monga!easynet.net!easynet-post1!not-for-mail From: "Mark Thornton" <mthornton@optrak.co.uk> Newsgroups: aus.computers.java,borland.public.jbuilder.java.language,comp.lang.java.programmer 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> <1024306483.86878@web.apex.net.au> Subject: Re: Multiple interfaces Date: Mon, 17 Jun 2002 10:56:03 +0100 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 Lines: 37 Message-ID: <3d0db19e$0$7200$afc38c87@news.easynet.co.uk> Organization: [posted via Easynet UK] NNTP-Posting-Host: 217.206.42.18 X-Trace: 1024307615 7200 217.206.42.18