Article View: comp.lang.eiffel
Article #1593Renaming vs. Conformance
From: Michael T Rowley
Date: Wed, 21 Feb 1990 21:08
Date: Wed, 21 Feb 1990 21:08
19 lines
1444 bytes
1444 bytes
I have been looking into questions of multiple inheritance, especially with regard to repeated inheritance. In eiffel a feature may be renamed along one of the inheritance paths, giving the descendant two features inherited from the same ancestor. (See FRANCE_US_DIVER on p.276 of OOSC). If the feature is not renamed, the descendent gets only one feature. It seems that the use of renaming would break the conformance rule (on p.262). The problem arises with a variable declared as the ancestor type (A). It should be possible to assign to this variable objects of any of its descendent types. But if a feature (f) was renamed on both paths to the descendent (D), then what does A.f mean. The conformance rule would claim that the assignment of A = D is valid, and therefore it should be possible to use the features of A. But, clearly this is ambiguous. Should the conformance rule specify that an object does not conform to an ancestral type from which it inherits at least one of the ancestor's features under two different names?
Technical Details
Message-ID:
<32149@shemp.CS.UCLA.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!ucla-cs!bath.cs.ucla.edu!rowleyShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!ucla-cs!bath.cs.ucla.edu!rowley From: rowley@bath.cs.ucla.edu (Michael T Rowley) Newsgroups: comp.lang.eiffel Subject: Renaming vs. Conformance Message-ID: <32149@shemp.CS.UCLA.EDU> Date: 21 Feb 90 21:08:52 GMT Sender: news@CS.UCLA.EDU Reply-To: rowley@cs.ucla.edu Organization: UCLA Computer Science Lines: 19