<?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=Interval_types</id>
		<title>Interval types - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://dev.eiffel.com/index.php?action=history&amp;feed=atom&amp;title=Interval_types"/>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Interval_types&amp;action=history"/>
		<updated>2026-05-07T08:24:01Z</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=Interval_types&amp;diff=9061&amp;oldid=prev</id>
		<title>Bmeyer: /* Expanded and Void */</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Interval_types&amp;diff=9061&amp;oldid=prev"/>
				<updated>2007-07-20T03:24:10Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Expanded and Void&lt;/span&gt;&lt;/span&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 03:24, 20 July 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 196:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 196:&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;It illustrates two problems in conjunction with &amp;lt;e&amp;gt;NONE&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;It illustrates two problems in conjunction with &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt;:&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;/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;/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;* The first is that &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; does not conform to expanded types. This makes it impossible to declare a type interval which includes all types in the system, reference or expanded. This prevents the programmer &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to write &lt;/del&gt;code &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which &lt;/del&gt;works with reference types and expanded types, say a generic print algorithm.&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;* The first is that &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; does not conform to expanded types. This makes it impossible to declare a type interval which includes all types in the system, reference or expanded. This prevents the programmer &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;from writing &lt;/ins&gt;code &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;that &lt;/ins&gt;works with reference types and expanded types, say a generic print algorithm.&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;* The second one is that &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; is of type &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt;. This raises the question how &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; should be assigned to an interval type of references, or how such a type is initialized in the first place.&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;* The second one is that &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; is of type &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt;. This raises the question how &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; should be assigned to an interval type of references, or how such a type is initialized in the first place.&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;/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;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bmeyer</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Interval_types&amp;diff=9060&amp;oldid=prev</id>
		<title>Bmeyer: Fixed terminology (argument vs parameter, generic derivation)</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Interval_types&amp;diff=9060&amp;oldid=prev"/>
				<updated>2007-07-20T03:23:02Z</updated>
		
		<summary type="html">&lt;p&gt;Fixed terminology (argument vs parameter, generic derivation)&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 03:23, 20 July 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&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;For features with formal arguments, another rule exists: A call on a feature which contains a formal argument is only valid if the generic substitution is monomorphic.&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;For features with formal arguments, another rule exists: A call on a feature which contains a formal argument is only valid if the generic substitution is monomorphic.&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;/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;/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;This means that a call on a feature &amp;lt;e&amp;gt;f (g: G)&amp;lt;/e&amp;gt; of a class &amp;lt;e&amp;gt;X [G]&amp;lt;/e&amp;gt; is only valid if &amp;lt;e&amp;gt;G&amp;lt;/e&amp;gt; is monomorphic. Thus the type has to be &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;instantiated &lt;/del&gt;with &amp;lt;e&amp;gt;X [Y..Y]&amp;lt;/e&amp;gt;. So a call to &amp;lt;e&amp;gt;f&amp;lt;/e&amp;gt; on a type &amp;lt;e&amp;gt;X [Y..NONE]&amp;lt;/e&amp;gt; is not allowed.&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;This means that a call on a feature &amp;lt;e&amp;gt;f (g: G)&amp;lt;/e&amp;gt; of a class &amp;lt;e&amp;gt;X [G]&amp;lt;/e&amp;gt; is only valid if &amp;lt;e&amp;gt;G&amp;lt;/e&amp;gt; is monomorphic. Thus the type has to be &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;generically derived &lt;/ins&gt;with &amp;lt;e&amp;gt;X [Y..Y]&amp;lt;/e&amp;gt;. So a call to &amp;lt;e&amp;gt;f&amp;lt;/e&amp;gt; on a type &amp;lt;e&amp;gt;X [Y..NONE]&amp;lt;/e&amp;gt; is not allowed.&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;/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;/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;=== Default behaviour ===&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;=== Default behaviour ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 161:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 161:&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;=== Generic features ===&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;=== Generic features ===&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;/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;/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;The rule about calling features with formal &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;parameters &lt;/del&gt;is too restrictive. Let's look at the following code:&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;The rule about calling features with formal &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;arguments &lt;/ins&gt;is too restrictive. Let's look at the following code:&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;/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;/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;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 201:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 201:&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;== Conclusion ==&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;== Conclusion ==&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;/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;/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;The rule about features with formal &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;parameters &lt;/del&gt;must be changed to make this solution usable as otherwise the use of generics is restricted too much.&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;The rule about features with formal &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;arguments &lt;/ins&gt;must be changed to make this solution usable as otherwise the use of generics is restricted too much.&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;/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;/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;The problem with &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; and &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; can easily be solved by declaring that &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; inherits from all types regardless of reference or expanded status. To solve the problem of assigning &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; to an interval type it can be defined that &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; is of any (detached) reference type. You could for example say that &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; always has the type of the lower bound of the target interval if this type is a (detached) reference type. That way it can be assigned to any interval of a reference type, even a monomorphic one, and it is still disallowed to assign it to expanded types.&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;The problem with &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; and &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; can easily be solved by declaring that &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; inherits from all types regardless of reference or expanded status. To solve the problem of assigning &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; to an interval type it can be defined that &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; is of any (detached) reference type. You could for example say that &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; always has the type of the lower bound of the target interval if this type is a (detached) reference type. That way it can be assigned to any interval of a reference type, even a monomorphic one, and it is still disallowed to assign it to expanded types.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bmeyer</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Interval_types&amp;diff=8949&amp;oldid=prev</id>
		<title>Juliant at 03:00, 6 July 2007</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Interval_types&amp;diff=8949&amp;oldid=prev"/>
				<updated>2007-07-06T03:00:09Z</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 03:00, 6 July 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&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;The intention of an interval type is to specify that an entity can only be attached to a type which lies inside the interval. Thus a type declared as &amp;lt;e&amp;gt;ANY..STRING&amp;lt;/e&amp;gt; can be attached to an object of dynamic type &amp;lt;e&amp;gt;ANY&amp;lt;/e&amp;gt; or dynamic type &amp;lt;e&amp;gt;STRING&amp;lt;/e&amp;gt;. It cannot be attached to an object of a type which lies outside this interval, for example &amp;lt;e&amp;gt;INTEGER&amp;lt;/e&amp;gt; or &amp;lt;e&amp;gt;PATH_NAME&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;The intention of an interval type is to specify that an entity can only be attached to a type which lies inside the interval. Thus a type declared as &amp;lt;e&amp;gt;ANY..STRING&amp;lt;/e&amp;gt; can be attached to an object of dynamic type &amp;lt;e&amp;gt;ANY&amp;lt;/e&amp;gt; or dynamic type &amp;lt;e&amp;gt;STRING&amp;lt;/e&amp;gt;. It cannot be attached to an object of a type which lies outside this interval, for example &amp;lt;e&amp;gt;INTEGER&amp;lt;/e&amp;gt; or &amp;lt;e&amp;gt;PATH_NAME&amp;lt;/e&amp;gt;.&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;/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;/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;Each interval type describes the set of types which belong to the interval. A type belongs to the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;inverval &lt;/del&gt;if it conforms to the lower bound (&amp;lt;e&amp;gt;LOWER&amp;lt;/e&amp;gt;) and if the upper bound (&amp;lt;e&amp;gt;UPPER&amp;lt;/e&amp;gt;) conforms to it.&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;Each interval type describes the set of types which belong to the interval. A type belongs to the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;interval &lt;/ins&gt;if it conforms to the lower bound (&amp;lt;e&amp;gt;LOWER&amp;lt;/e&amp;gt;) and if the upper bound (&amp;lt;e&amp;gt;UPPER&amp;lt;/e&amp;gt;) conforms to it.&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;/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;/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;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&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;=== Generic features ===&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;=== Generic features ===&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;/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;/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;For features with formal arguments, another rule exists: A call on a feature &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;wich &lt;/del&gt;contains a formal argument is only valid if the generic substitution is monomorphic.&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;For features with formal arguments, another rule exists: A call on a feature &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;which &lt;/ins&gt;contains a formal argument is only valid if the generic substitution is monomorphic.&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;/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;/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;This means that a call on a feature &amp;lt;e&amp;gt;f (g: G)&amp;lt;/e&amp;gt; of a class &amp;lt;e&amp;gt;X [G]&amp;lt;/e&amp;gt; is only valid if &amp;lt;e&amp;gt;G&amp;lt;/e&amp;gt; is monomorphic. Thus the type has to be &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;instantitated &lt;/del&gt;with &amp;lt;e&amp;gt;X [Y..Y]&amp;lt;/e&amp;gt;. So a call to &amp;lt;e&amp;gt;f&amp;lt;/e&amp;gt; on a type &amp;lt;e&amp;gt;X [Y..NONE]&amp;lt;/e&amp;gt; is not allowed.&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;This means that a call on a feature &amp;lt;e&amp;gt;f (g: G)&amp;lt;/e&amp;gt; of a class &amp;lt;e&amp;gt;X [G]&amp;lt;/e&amp;gt; is only valid if &amp;lt;e&amp;gt;G&amp;lt;/e&amp;gt; is monomorphic. Thus the type has to be &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;instantiated &lt;/ins&gt;with &amp;lt;e&amp;gt;X [Y..Y]&amp;lt;/e&amp;gt;. So a call to &amp;lt;e&amp;gt;f&amp;lt;/e&amp;gt; on a type &amp;lt;e&amp;gt;X [Y..NONE]&amp;lt;/e&amp;gt; is not allowed.&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;/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;/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;=== Default behaviour ===&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;=== Default behaviour ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 65:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 65:&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;=== Cats and dogs ===&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;=== Cats and dogs ===&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;/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;/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;A feature call on a target ''t'' is only valid if it is valid for all polymorphic types which can possibly be assigned to ''t''. With interval types the set of conforming types can be &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;restriced &lt;/del&gt;in order to be able to perform calls to features which are covariantly redefined in &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;descendands &lt;/del&gt;by excluding such descendants from the dynamic type set. &amp;#160;&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;A feature call on a target ''t'' is only valid if it is valid for all polymorphic types which can possibly be assigned to ''t''. With interval types the set of conforming types can be &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;restricted &lt;/ins&gt;in order to be able to perform calls to features which are covariantly redefined in &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;descendants &lt;/ins&gt;by excluding such descendants from the dynamic type set. &amp;#160;&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;/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;/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;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 203:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 203:&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;The rule about features with formal parameters must be changed to make this solution usable as otherwise the use of generics is restricted too much.&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;The rule about features with formal parameters must be changed to make this solution usable as otherwise the use of generics is restricted too much.&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;/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;/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;The problem with &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; and &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; can easily be solved by declaring that &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; inherits from all types regardless of reference or expanded status. To solve the problem of assigning &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; to an interval type it can be defined that &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; is of any (detached) reference type. You could for example say that &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; always has the type of the lower bound of the target interval if this type is a (detached) reference type. That way it can be assigned to any interval of a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;refernce &lt;/del&gt;type, even a monomorphic one, and it is still disallowed to assign it to expanded types.&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;The problem with &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; and &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; can easily be solved by declaring that &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; inherits from all types regardless of reference or expanded status. To solve the problem of assigning &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; to an interval type it can be defined that &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; is of any (detached) reference type. You could for example say that &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; always has the type of the lower bound of the target interval if this type is a (detached) reference type. That way it can be assigned to any interval of a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;reference &lt;/ins&gt;type, even a monomorphic one, and it is still disallowed to assign it to expanded types.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Juliant</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Interval_types&amp;diff=8944&amp;oldid=prev</id>
		<title>Juliant: /* Conclusion */</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Interval_types&amp;diff=8944&amp;oldid=prev"/>
				<updated>2007-07-06T02:45:12Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Conclusion&lt;/span&gt;&lt;/span&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 02:45, 6 July 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 203:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 203:&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;The rule about features with formal parameters must be changed to make this solution usable as otherwise the use of generics is restricted too much.&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;The rule about features with formal parameters must be changed to make this solution usable as otherwise the use of generics is restricted too much.&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;/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;/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;The problem with &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; and &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; can easily be solved by declaring that &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; inherits from all types regardless of reference or expanded status. To solve the problem of assigning &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; to an interval type it can be defined that &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; is of any (detached) reference type. That way it can be assigned to any interval of a refernce type, even a monomorphic one, and it is still disallowed to assign it to expanded types.&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;The problem with &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; and &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; can easily be solved by declaring that &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; inherits from all types regardless of reference or expanded status. To solve the problem of assigning &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; to an interval type it can be defined that &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; is of any &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(detached) reference type. You could for example say that &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; always has the type of the lower bound of the target interval if this type is a &lt;/ins&gt;(detached) reference type. That way it can be assigned to any interval of a refernce type, even a monomorphic one, and it is still disallowed to assign it to expanded types.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Juliant</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Interval_types&amp;diff=8939&amp;oldid=prev</id>
		<title>Juliant at 02:16, 6 July 2007</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Interval_types&amp;diff=8939&amp;oldid=prev"/>
				<updated>2007-07-06T02:16:41Z</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;
[[Category:Catcall]]&lt;br /&gt;
{{Research}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
With interval types, the programmer can restrict the conforming types for an entity. This way, the type set which needs to be checked for system validity of a feature call is restricted to a smaller set of types. In addition, certain rules for generic types will prohibit the unsafe use of generics.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
At every location where a normal type is expected, an interval type can be specified by adding an upper bound for each type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
LOWER..UPPER&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This specifies an interval of all types between the types &amp;lt;e&amp;gt;LOWER&amp;lt;/e&amp;gt; and &amp;lt;e&amp;gt;UPPER&amp;lt;/e&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Semantics ==&lt;br /&gt;
&lt;br /&gt;
The intention of an interval type is to specify that an entity can only be attached to a type which lies inside the interval. Thus a type declared as &amp;lt;e&amp;gt;ANY..STRING&amp;lt;/e&amp;gt; can be attached to an object of dynamic type &amp;lt;e&amp;gt;ANY&amp;lt;/e&amp;gt; or dynamic type &amp;lt;e&amp;gt;STRING&amp;lt;/e&amp;gt;. It cannot be attached to an object of a type which lies outside this interval, for example &amp;lt;e&amp;gt;INTEGER&amp;lt;/e&amp;gt; or &amp;lt;e&amp;gt;PATH_NAME&amp;lt;/e&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each interval type describes the set of types which belong to the interval. A type belongs to the inverval if it conforms to the lower bound (&amp;lt;e&amp;gt;LOWER&amp;lt;/e&amp;gt;) and if the upper bound (&amp;lt;e&amp;gt;UPPER&amp;lt;/e&amp;gt;) conforms to it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
a: A .. C &amp;lt;=&amp;gt; {A, B, C}&lt;br /&gt;
b: A .. B &amp;lt;=&amp;gt; {A, B}&lt;br /&gt;
c: A .. NONE &amp;lt;=&amp;gt; {A, B, C, ...}&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conformance rules ===&lt;br /&gt;
&lt;br /&gt;
An interval type ''b'' conforms to an interval type ''a'' if it is a sub-interval of ''a''. So if ''a'' fully encloses the interval ''b'', ''b'' conforms to ''a''.&lt;br /&gt;
&lt;br /&gt;
The conformance rules can also be explained by differently:&lt;br /&gt;
&lt;br /&gt;
* An interval type ''b'' conforms to an interval type ''a'' if the set of types described by the interval of ''b'' is a subset of the set described by the interval of ''a''.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;e&amp;gt;&lt;br /&gt;
a := b -- Is valid as {A, B} is a subset of {A, B, C}&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A type &amp;lt;e&amp;gt;b: C..D&amp;lt;/e&amp;gt; conforms to the type &amp;lt;e&amp;gt;a: A..B&amp;lt;/e&amp;gt; if &amp;lt;e&amp;gt;C&amp;lt;/e&amp;gt; conforms to &amp;lt;e&amp;gt;A&amp;lt;/e&amp;gt; and &amp;lt;e&amp;gt;B&amp;lt;/e&amp;gt; conforms to &amp;lt;e&amp;gt;D&amp;lt;/e&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Generic conformance is the same as it is now: A generic type ''b'' conforms to a generic type ''a'' if the base class of ''b'' conforms to ''a'' and all generic parameters conform as well.&lt;br /&gt;
&lt;br /&gt;
=== Generic features ===&lt;br /&gt;
&lt;br /&gt;
For features with formal arguments, another rule exists: A call on a feature wich contains a formal argument is only valid if the generic substitution is monomorphic.&lt;br /&gt;
&lt;br /&gt;
This means that a call on a feature &amp;lt;e&amp;gt;f (g: G)&amp;lt;/e&amp;gt; of a class &amp;lt;e&amp;gt;X [G]&amp;lt;/e&amp;gt; is only valid if &amp;lt;e&amp;gt;G&amp;lt;/e&amp;gt; is monomorphic. Thus the type has to be instantitated with &amp;lt;e&amp;gt;X [Y..Y]&amp;lt;/e&amp;gt;. So a call to &amp;lt;e&amp;gt;f&amp;lt;/e&amp;gt; on a type &amp;lt;e&amp;gt;X [Y..NONE]&amp;lt;/e&amp;gt; is not allowed.&lt;br /&gt;
&lt;br /&gt;
=== Default behaviour ===&lt;br /&gt;
&lt;br /&gt;
As a shorthand for interval definition, we define the following default behaviour which is different for ordinary types and for actual generic type parameters. Ordinary types are per default polymorphic and actual formal parameters monomorphic:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
x: T &amp;lt;=&amp;gt; T .. NONE&lt;br /&gt;
y: A [T] &amp;lt;=&amp;gt; A [T .. T] .. NONE&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
See the [[introduction to examples]] for information about the classes used.&lt;br /&gt;
&lt;br /&gt;
=== Cats and dogs ===&lt;br /&gt;
&lt;br /&gt;
A feature call on a target ''t'' is only valid if it is valid for all polymorphic types which can possibly be assigned to ''t''. With interval types the set of conforming types can be restriced in order to be able to perform calls to features which are covariantly redefined in descendands by excluding such descendants from the dynamic type set. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
a_none: ANIMAL &amp;lt;=&amp;gt; ANIMAL .. NONE&lt;br /&gt;
c_none: CAT &amp;lt;=&amp;gt; ANIMAL .. NONE&lt;br /&gt;
d_none: DOG &amp;lt;=&amp;gt; ANIMAL .. NONE&lt;br /&gt;
a_a: ANIMAL .. ANIMAL&lt;br /&gt;
c_c: CAT .. CAT&lt;br /&gt;
d_d: DOG .. DOG&lt;br /&gt;
a_c: ANIMAL .. CAT&lt;br /&gt;
a_d: ANIMAL .. DOG&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid assignments:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
a_none := c_none&lt;br /&gt;
a_none := d_none&lt;br /&gt;
a_none := a_a&lt;br /&gt;
a_none := c_c&lt;br /&gt;
a_none := d_d&lt;br /&gt;
c_none := c_c&lt;br /&gt;
d_none := d_d&lt;br /&gt;
&lt;br /&gt;
a_c := a_a&lt;br /&gt;
a_c := c_c&lt;br /&gt;
a_d := a_a&lt;br /&gt;
a_d := d_d&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Invalid assignments:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
-- Invalid: a_a := a_none&lt;br /&gt;
-- Invalid: c_c := c_none&lt;br /&gt;
-- Invalid: d_d := d_none&lt;br /&gt;
-- Invalid: a_c := c_none&lt;br /&gt;
-- Invalid: a_d := d_none&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid calls:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
a_none.eat (cat_food)&lt;br /&gt;
a_a.eat (food)&lt;br /&gt;
a_d.eat (food)&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Invalid calls:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
a_none.eat (food)&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== A simple generic algorithm ===&lt;br /&gt;
&lt;br /&gt;
It is easy to declare an algorithm which needs only read-access on a list:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
class PERSON_PRINTER&lt;br /&gt;
feature&lt;br /&gt;
  print_all (a_list: LIST [PERSON..NONE])&lt;br /&gt;
      -- Print all attributes of each person in the list.&lt;br /&gt;
    do&lt;br /&gt;
      from&lt;br /&gt;
        a_list.start&lt;br /&gt;
      until&lt;br /&gt;
        a_list.after&lt;br /&gt;
      do &lt;br /&gt;
          -- Reading is valid on a covariant list&lt;br /&gt;
        a_list.item.print&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
class EXAMPLE&lt;br /&gt;
feature&lt;br /&gt;
  make&lt;br /&gt;
    local&lt;br /&gt;
      l_students: LIST [STUDENT]       &amp;lt;=&amp;gt; LIST [STUDENT..STUDENT]&lt;br /&gt;
      l_professors: LIST [PROFESSOR]   &amp;lt;=&amp;gt; LIST [PROFESSOR..PROFESSOR]&lt;br /&gt;
      l_person_printer: PERSON_PRINTER&lt;br /&gt;
    do&lt;br /&gt;
      create l_person_printer&lt;br /&gt;
        -- LIST [STUDENT..STUDENT] conforms to LIST [PERSON..NONE]&lt;br /&gt;
      l_person_printer.print_all (l_students)&lt;br /&gt;
        -- LIST [PROFESSOR..PROFESSOR] conforms to LIST [PERSON..NONE]&lt;br /&gt;
      l_person_printer.print_all (l_professor)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
&lt;br /&gt;
=== Generic features ===&lt;br /&gt;
&lt;br /&gt;
The rule about calling features with formal parameters is too restrictive. Let's look at the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
deferred class COMPONENT&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class COMPOSITE&lt;br /&gt;
inherit COMPONENT&lt;br /&gt;
feature&lt;br /&gt;
  components: LIST [COMPONENT]&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What should the type of feature &amp;lt;e&amp;gt;components&amp;lt;/e&amp;gt; be? In order to be able to call &amp;lt;e&amp;gt;extend&amp;lt;/e&amp;gt; on the list, it has to be monomorphic, thus &amp;lt;e&amp;gt;LIST [COMPONENT..COMPONENT]&amp;lt;/e&amp;gt;. But since the argument type is now &amp;lt;e&amp;gt;COMPONENT..COMPONENT&amp;lt;/e&amp;gt; we actually cannot add anything to the list as no descendant of &amp;lt;e&amp;gt;COMPONENT&amp;lt;/e&amp;gt; is in the interval. Actually, since &amp;lt;e&amp;gt;COMPONENT&amp;lt;/e&amp;gt; is deferred nothing can be added to the list at all.&lt;br /&gt;
&lt;br /&gt;
But if we define the list as &amp;lt;e&amp;gt;LIST [COMPONENT..NONE]&amp;lt;/e&amp;gt; - thus allowing descendants of &amp;lt;e&amp;gt;COMPONENT&amp;lt;/e&amp;gt; in the list - then the rule about features with formal arguments disallows any calls to feature &amp;lt;e&amp;gt;extend&amp;lt;/e&amp;gt; as the argument is not monomorphic anymore.&lt;br /&gt;
&lt;br /&gt;
=== Expanded and Void ===&lt;br /&gt;
&lt;br /&gt;
Look at the following code snippet:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;e&amp;gt;&lt;br /&gt;
local&lt;br /&gt;
  any_none: ANY..NONE&lt;br /&gt;
  any_string: ANY..STRING&lt;br /&gt;
do&lt;br /&gt;
    -- invalid as NONE does not conform to INTEGER&lt;br /&gt;
  any_none := 5&lt;br /&gt;
    -- invalid as NONE is not in the interval ANY..STRING&lt;br /&gt;
  any_string := Void&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/e&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It illustrates two problems in conjunction with &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* The first is that &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; does not conform to expanded types. This makes it impossible to declare a type interval which includes all types in the system, reference or expanded. This prevents the programmer to write code which works with reference types and expanded types, say a generic print algorithm.&lt;br /&gt;
* The second one is that &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; is of type &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt;. This raises the question how &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; should be assigned to an interval type of references, or how such a type is initialized in the first place.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
The rule about features with formal parameters must be changed to make this solution usable as otherwise the use of generics is restricted too much.&lt;br /&gt;
&lt;br /&gt;
The problem with &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; and &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; can easily be solved by declaring that &amp;lt;e&amp;gt;NONE&amp;lt;/e&amp;gt; inherits from all types regardless of reference or expanded status. To solve the problem of assigning &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; to an interval type it can be defined that &amp;lt;e&amp;gt;Void&amp;lt;/e&amp;gt; is of any (detached) reference type. That way it can be assigned to any interval of a refernce type, even a monomorphic one, and it is still disallowed to assign it to expanded types.&lt;/div&gt;</summary>
		<author><name>Juliant</name></author>	</entry>

	</feed>