<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 21, 2014 at 5:30 AM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">To be abstract, or to be concrete, that is the question.<br>
<br>
Coming back to Eliot&#39;s proposal:<br>
<span class=""><br>
&gt; modify class Float to be an abstract class, and add two subclasses, BoxedFloat and SmallFloat, such that existing boxed instances of Float outside the SmallFloat range will become instances of BoxedFloat and instances within that range will be replaced by references to the relevant SmallFloat.<br>
</span>&gt; [...]<br>
&gt; An alternative [...] is to add a superclass, e.g. LimitedPrecisionReal, move most of the methods into it, and keep Float as Float, and add SmallFloat as a subclass of LimitedPrecisionReal.<br>
<br>
<br>
Float<br>
  |<br>
  +------- BoxedFloat<br>
  |<br>
  +------- SmallFloat<br>
<br>
<br>
LimitedPrecisionReal<br>
  |<br>
  +------- Float<br>
  |<br>
  +------- SmallFloat<br>
<br>
<br>
The actual question was if the class named &quot;Float&quot; (as used in expressions like &quot;Float pi&quot;) should be concrete or abstract.<br>
<br>
I strongly agree with Eliot&#39;s assessment that making Float the abstract superclass is best. What we name the two concrete subclasses is bikeshedding, and I trust Eliot to pick something not too unreasonable.<br></blockquote><div><br></div><div>Good.  I think I&#39;ll go with</div><div><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">Float</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">  |</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">  +------- BoxedDouble</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">  |</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">  +------- SmallDouble</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br></span></div><div> </div><div>ImmediateDouble is fine too, but I like the symmetry with SmallInteger.</div></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>