Article View: aus.computers.java
Article #242Re: Multiple interfaces
From: Coho (Richard Swain)
Date: Fri, 21 Jun 2002 21:20
Date: Fri, 21 Jun 2002 21:20
33 lines
3115 bytes
3115 bytes
But that doesn't address the original problem - "How does one distinguish between methods that happen to have the same name on two different interfaces inherited by the implementation?" Chris Smith wrote: > Coho (Richard Swain) wrote ... > >>What is the answer? >> > > > The answer is to pass the abstraction that represents the set of > information that the method needs, and to declare the method to accept > the set of information that it needs. To complain about not being able > to get back to the original interface is, essentially, complaining that > you can't write a method declared to take one type parameter, and then > have it access that data as a different type. If the method needed to be > able to treat the object as a MyClass, it should never have declared its > parameter to be of type Intf1. > > I honestly can't find a single reason that this is even a problem, aside > from the fact that someone said that dropping any kind of information > makes them feel "alienated". Programming without ever dropping > information is antithetical to abstraction, and it's not workable. > > Chris Smith -- http://www.krang.f9.co.uk
Technical Details
Message-ID:
<3D139891.8010206@krang.f9.co.uk>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.belnet.be!news.belnet.be!fr.clara.net!heighliner.fr.clara.net!newsfeed.stueberl.de!newspeer1-gui.server.ntli.net!ntli.net!news6-win.server.ntlworld.com.POSTED!not-for-mailReferences:
<1024283082.192985@web.apex.net.au> <JScP8.111$Fv1.17660@newsread2.prod.itd.earthlink.net> <1024289793.45649@web.apex.net.au> <pan.2002.06.17.07.46.24.235390.777@databasix.com> <3D0F7E91.5010401@krang.f9.co.uk> <3d10edc6.1491361@news.virgin.net> <3D1101BE.40506@krang.f9.co.uk> <3d121553.1321895@news.virgin.net> <3D126A72.4123E49B@i.hate.spam> <pan.2002.06.21.07.16.04.89148.1938@databasix.com> <3D132DC5.2080202@krang.f9.co.uk> <pan.2002.06.21.10.08.49.163730.2532@databasix.com> <3D135D0D.3060804@krang.f9.co.uk> <MPG.177d108baac3f38098a0e2@news.altopia.com>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: 10a146,113f3357bc588129 X-Google-Attributes: gid10a146,public X-Google-Thread: f74b3,113f3357bc588129 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2002-06-21 14:19:48 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.belnet.be!news.belnet.be!fr.clara.net!heighliner.fr.clara.net!newsfeed.stueberl.de!newspeer1-gui.server.ntli.net!ntli.net!news6-win.server.ntlworld.com.POSTED!not-for-mail Message-ID: <3D139891.8010206@krang.f9.co.uk> From: "Coho (Richard Swain)" <vibron@krang.f9.co.uk> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en,ru MIME-Version: 1.0 Newsgroups: aus.computers.java,borland.public.jbuilder.java.language,comp.lang.java.programmer Subject: Re: Multiple interfaces References: <1024283082.192985@web.apex.net.au> <JScP8.111$Fv1.17660@newsread2.prod.itd.earthlink.net> <1024289793.45649@web.apex.net.au> <pan.2002.06.17.07.46.24.235390.777@databasix.com> <3D0F7E91.5010401@krang.f9.co.uk> <3d10edc6.1491361@news.virgin.net> <3D1101BE.40506@krang.f9.co.uk> <3d121553.1321895@news.virgin.net> <3D126A72.4123E49B@i.hate.spam> <pan.2002.06.21.07.16.04.89148.1938@databasix.com> <3D132DC5.2080202@krang.f9.co.uk> <pan.2002.06.21.10.08.49.163730.2532@databasix.com> <3D135D0D.3060804@krang.f9.co.uk> <MPG.177d108baac3f38098a0e2@news.altopia.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Lines: 34 Date: Fri, 21 Jun 2002 22:20:17 +0100 NNTP-Posting-Host: 213.104.40.118 X-Complaints-To: abuse@ntlworld.com X-Trace: news6-win.server.ntlworld.com 1024694385 213.104.40.118 (Fri, 21 Jun 2002 22:19:45 BST) NNTP-Posting-Date: Fri, 21 Jun 2002 22:19:45 BST Organization: ntlworld News Service