Newsgroups: comp.lang.java.tech,comp.lang.eiffel,comp.lang.dylan
Path: cantaloupe.srv.cs.cmu.edu!nntp.club.cc.cmu.edu!goldenapple.srv.cs.cmu.edu!das-news2.harvard.edu!fas-news.harvard.edu!newspump.wustl.edu!data.ramona.vix.com!sonysjc!su-news-hub1.bbnplanet.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!feed1.news.erols.com!news.ecn.uoknor.edu!munnari.OZ.AU!news.mel.connect.com.au!news.syd.connect.com.au!syd.csa.com.au!news
From: donh@syd.csa.com.au (Don Harrison)
Subject: Re: Replacing Multiple Inheritance with Java's Interfaces
X-Nntp-Posting-Host: dev50
Message-ID: <E8Ctq2.JGx@syd.csa.com.au>
Sender: news@syd.csa.com.au
Reply-To: donh@syd.csa.com.au
Organization: CSC Australia, Sydney
References: <E8Coou.G9E@syd.csa.com.au>
Date: Wed, 9 Apr 1997 04:56:26 GMT
Lines: 28
Xref: glinda.oz.cs.cmu.edu comp.lang.java.tech:9940 comp.lang.eiffel:19435 comp.lang.dylan:8024

I wrote:

:Frank Mitchell wrote:
:
::You're right, the ways to manage this in traditional OO -- principally the 
::Visitor pattern from the Gang of Four -- make this sort of thing tricky.  
::Many times, though, you can find some simplifying condition: ..
:
:In the case of Eiffel, another specific case allows an elegant solution.
:In the special case where, for each value of a parameter, there is only one 
:corresponding value for each of the other parameters, you can use covariance.

Oops! That's not quite right. I should have said:

In the special case where, for each value of a parameter, 

  a) The corresponding value for each of the other parameters is a particular 
     value (or a more specific one), and
  b) The values of parameters become more specific in tandem,

you can use covariance.


Don.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Don Harrison             donh@syd.csa.com.au


