🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #278

Re: Multiple interfaces

#278
From: Tim Tyler
Date: Mon, 17 Jun 2002 08:22
30 lines
2523 bytes
Tristan Reeves <moonshine@apex.net.au> wrote:

: The best way for dealing with this that I have seen is in Delphi (object
: pascal), in which you can have "name-resolution" statements in your class
: declaration. So you can say Intf1.X()=MyClass.Interface1X(), and then calls
: to that interface method [X()]will get mapped to the specified method
: [Interface1X()].

That is also - more or less - what Eiffel does.

http://www.elj.com/eiffel/ij/inheritance/mi/ describes the problem
with C++:

''In C++, you must use the scope resolution operator in the code, every
  time you run into an ambiguity problem between two or more members. This
  clutters the code, and makes it less malleable, as if anything changes
  that affects the ambiguity, you potentially have to change the code
  everywhere, where the ambiguity occurs.''

 - http://www.elj.com/eiffel/ij/inheritance/mi/

Eiffel advocates renaming - through inheritance.  That way - if you get a
name clash - you don't have to go through all the existing code renaming
all the calls to the newly-ambiguous method - and you can still find the
names of the methods you are interested in the class where they are called.

Could Java be changed to do things that way?  I don't see why not.
-- 
__________
 |im |yler  http://timtyler.org/  tim@tt1.org
Technical Details
Message-ID: <GxuCL8.82p@bath.ac.uk>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!newspeer.clara.net!news.clara.net!server3.netnews.ja.net!bath.ac.uk!unknown
References: <1024283082.192985@web.apex.net.au> <JScP8.111$Fv1.17660@newsread2.prod.itd.earthlink.net> <1024289793.45649@web.apex.net.au> <3d0d7f8d_1@news.iprimus.com.au> <1024298741.828605@web.apex.net.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10a146,113f3357bc588129
X-Google-Attributes: gid10a146,public
X-Google-Thread: 10d6db,113f3357bc588129
X-Google-Attributes: gid10d6db,public
X-Google-Thread: f74b3,113f3357bc588129
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2002-06-17 01:31:02 PST
Newsgroups: aus.computers.java,borland.public.jbuilder.java.language,comp.lang.java.programmer
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!newspeer.clara.net!news.clara.net!server3.netnews.ja.net!bath.ac.uk!unknown
From: Tim Tyler <tim@tt1.org>
Subject: Re: Multiple interfaces
User-Agent: tin/1.4.3-20000502 ("Marian") (UNIX) (Linux/2.4.17-grsec-1.9.3a (i686))
Reply-To: tim@tt1.org
Sender: unknown@bits.bris.ac.uk (Address not verified)
Organization: University of Bristol, UK
Message-ID: <GxuCL8.82p@bath.ac.uk>
References: <1024283082.192985@web.apex.net.au> <JScP8.111$Fv1.17660@newsread2.prod.itd.earthlink.net> <1024289793.45649@web.apex.net.au> <3d0d7f8d_1@news.iprimus.com.au> <1024298741.828605@web.apex.net.au>
Date: Mon, 17 Jun 2002 08:22:20 GMT
Lines: 30