<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://dev.eiffel.com/index.php?action=history&amp;feed=atom&amp;title=Named_Inheritance</id>
		<title>Named Inheritance - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://dev.eiffel.com/index.php?action=history&amp;feed=atom&amp;title=Named_Inheritance"/>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Named_Inheritance&amp;action=history"/>
		<updated>2026-05-19T21:47:20Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Named_Inheritance&amp;diff=11732&amp;oldid=prev</id>
		<title>Clemahieu at 23:16, 1 November 2008</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Named_Inheritance&amp;diff=11732&amp;oldid=prev"/>
				<updated>2008-11-01T23:16:34Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 23:16, 1 November 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 178:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 178:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;two: B&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;two: B&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;do&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;do&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;create &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;A&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;create &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;obj&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;one := &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;a&lt;/del&gt;.one&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;one := &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;obj&lt;/ins&gt;.one&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;two := &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;a&lt;/del&gt;.two&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;two := &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;obj&lt;/ins&gt;.two&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/e&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/e&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Clemahieu</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Named_Inheritance&amp;diff=11731&amp;oldid=prev</id>
		<title>Clemahieu at 19:55, 31 October 2008</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Named_Inheritance&amp;diff=11731&amp;oldid=prev"/>
				<updated>2008-10-31T19:55:51Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:ECMA]]&lt;br /&gt;
{{Research}}&lt;br /&gt;
&lt;br /&gt;
Motivation:&lt;br /&gt;
*Remove the need for adapter classes.&lt;br /&gt;
*Reconcile the relatively loose conventions around agents in to the more strict conventions of inheritance.&lt;br /&gt;
&lt;br /&gt;
Similarity between adapter classes and agents&lt;br /&gt;
----&lt;br /&gt;
Take the starting classes A and B:&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
class A&lt;br /&gt;
feature&lt;br /&gt;
process_1&lt;br /&gt;
do&lt;br /&gt;
 -- Operate on value_1&lt;br /&gt;
end&lt;br /&gt;
value_1: INTEGER&lt;br /&gt;
test_1: BOOLEAN&lt;br /&gt;
process_2&lt;br /&gt;
do&lt;br /&gt;
 -- Different operation on value_2&lt;br /&gt;
end&lt;br /&gt;
value_2: INTEGER&lt;br /&gt;
test_2: BOOLEAN&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
deferred class B&lt;br /&gt;
feature&lt;br /&gt;
process&lt;br /&gt;
deferred&lt;br /&gt;
end&lt;br /&gt;
value: INTEGER&lt;br /&gt;
deferred&lt;br /&gt;
end&lt;br /&gt;
test: BOOLEAN&lt;br /&gt;
deferred&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And adapters C and D:&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
class C&lt;br /&gt;
inherit&lt;br /&gt;
B&lt;br /&gt;
feature&lt;br /&gt;
make (sourceA: A)&lt;br /&gt;
do&lt;br /&gt;
source := sourceA&lt;br /&gt;
end&lt;br /&gt;
source: A&lt;br /&gt;
process&lt;br /&gt;
do&lt;br /&gt;
source.process_1&lt;br /&gt;
end&lt;br /&gt;
value: INTEGER&lt;br /&gt;
do&lt;br /&gt;
result := source.process_1&lt;br /&gt;
end&lt;br /&gt;
test: INTEGER&lt;br /&gt;
do&lt;br /&gt;
result := source.test_1&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
class D&lt;br /&gt;
inherit&lt;br /&gt;
B&lt;br /&gt;
feature&lt;br /&gt;
make (sourceA: A)&lt;br /&gt;
do&lt;br /&gt;
source := sourceA&lt;br /&gt;
end&lt;br /&gt;
source: A&lt;br /&gt;
process&lt;br /&gt;
do&lt;br /&gt;
source.process_2&lt;br /&gt;
end&lt;br /&gt;
value: INTEGER&lt;br /&gt;
do&lt;br /&gt;
result := source.value_2&lt;br /&gt;
end&lt;br /&gt;
test: BOOLEAN&lt;br /&gt;
do&lt;br /&gt;
result := source.test_2&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using these adapters, if A wanted to provide clients access to itself in 2 different ways through B, the following features could be added to A:&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
class A&lt;br /&gt;
--Same features as above--&lt;br /&gt;
feature&lt;br /&gt;
one: B&lt;br /&gt;
do&lt;br /&gt;
result := create {C}.make (current)&lt;br /&gt;
end&lt;br /&gt;
two: B&lt;br /&gt;
do&lt;br /&gt;
result := create {D}.make (current)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another way A could provide access to itself similar to B is by use of agents:&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
class A&lt;br /&gt;
--Same features as above--&lt;br /&gt;
feature&lt;br /&gt;
one: TUPLE [process: PROCEDURE [ANY, []], value: FUNCTION[ANY, [], INTEGER], test: FUNCTION[ANY, [], BOOLEAN]]&lt;br /&gt;
do&lt;br /&gt;
result.process := agent process_1&lt;br /&gt;
result.value := agent value_1&lt;br /&gt;
result.test := agent test_1&lt;br /&gt;
end&lt;br /&gt;
two: TUPLE [process: PROCEDURE [ANY, []], value: FUNCTION[ANY, [], INTEGER], test: FUNCTION[ANY, [], BOOLEAN]]&lt;br /&gt;
do&lt;br /&gt;
result.process := agent process_2&lt;br /&gt;
result.value := agent value_2&lt;br /&gt;
result.test := agent test_2&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disadvantages of adapters:&lt;br /&gt;
*Requires 1 new class for every way a class wishes to provide facilities to clients.&lt;br /&gt;
&lt;br /&gt;
Disadvantages of agents:&lt;br /&gt;
*Requires a new, though already implemented, language construct `agents'.&lt;br /&gt;
*Strongly typed contracts related to agents are not defined.&lt;br /&gt;
&lt;br /&gt;
Implementation of A using named inheritance:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
class A&lt;br /&gt;
inherit&lt;br /&gt;
one: B&lt;br /&gt;
rename&lt;br /&gt;
process as process_1,&lt;br /&gt;
value as value_1,&lt;br /&gt;
test as test_1&lt;br /&gt;
end&lt;br /&gt;
two: B&lt;br /&gt;
rename&lt;br /&gt;
process as process_2,&lt;br /&gt;
value as value_2,&lt;br /&gt;
test as test_2&lt;br /&gt;
end&lt;br /&gt;
feature&lt;br /&gt;
process_1&lt;br /&gt;
do&lt;br /&gt;
 -- Operate on value_1&lt;br /&gt;
end&lt;br /&gt;
value_1: INTEGER&lt;br /&gt;
test_1: BOOLEAN&lt;br /&gt;
process_2&lt;br /&gt;
do&lt;br /&gt;
 -- Different operation on value_2&lt;br /&gt;
end&lt;br /&gt;
value_2: INTEGER&lt;br /&gt;
test_2: BOOLEAN&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A client of A could make use of the named inheritance functionality as such:&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
class APPLICATION&lt;br /&gt;
feature&lt;br /&gt;
make&lt;br /&gt;
local&lt;br /&gt;
obj: A&lt;br /&gt;
one: B&lt;br /&gt;
two: B&lt;br /&gt;
do&lt;br /&gt;
create A&lt;br /&gt;
one := a.one&lt;br /&gt;
two := a.two&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clemahieu</name></author>	</entry>

	</feed>