<div dir="ltr">Hi Tobias,<div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 21, 2014 at 4:51 AM, Tobias Pape <span dir="ltr">&lt;<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span class=""><br>
On 21.11.2014, at 13:44, Bert Freudenberg &lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>&gt; wrote:<br>
<br>
&gt; On 21.11.2014, at 13:29, J. Vuletich (mail lists) &lt;<a href="mailto:juanlists@jvuletich.org">juanlists@jvuletich.org</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Quoting Bert Freudenberg &lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>&gt;:<br>
&gt;&gt;&gt;<br>
</span><span class="">&gt;&gt;&gt; I&#39;d suggest BoxedDouble and ImmediateDouble as names for the concrete subclasses (*). Names do mean something. (**)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; You&#39;re right about the FloatArray confusion. However, note that the IEEE standard calls it single and double. It&#39;s only C using &quot;float&quot; to mean &quot;single precision&quot;.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I&#39;d name the abstract superclass Float, for readability, and the isFloat test etc. Also: &quot;Float pi&quot; reads a lot nicer than anything else. I don&#39;t see the need for having a deep LimitedPrecisionReal - Float - BoxedDouble/ImmediateDouble deep hierarchy now.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; If we ever add single-precision floats, we should name them BoxedSingle and ImmediateSingle. At that point we might want a Single superclass and a LimitedPrecisionReal supersuperclass, but we can cross that bridge when we get there.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; - Bert -<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; (*) Since we&#39;re not going to see the class names often, we could even spell it out as BoxedDoublePrecisionFloat and ImmediateDoublePrecisionFloat. Only half joking. It would make the relation to the abstract Float very clear.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; (**) We could also try to make the names googleable. I was surprised to not get a good hit for &quot;boxed immediate&quot;. Only &quot;boxed unboxed&quot; finds it. Maybe there are two better words?<br>
&gt;&gt;<br>
&gt;&gt; I very much agree with Bert. But I&#39;d suggest SmallDouble instead of ImmediateDouble for consistency with SmallInteger.<br>
&gt;<br>
</span>&gt; Then it would have to be LargeDouble for consistency with LargeInteger, too. Which I don&#39;t find compelling.<br>
&gt;<br>
&gt; Also, with the 64 bit format we get many more immediate objects. There already are immediate integers and characters, floats will be the third, there could be more, like immediate points. For those, the small/large distinction does not make sense.<br>
&gt;<br>
&gt; Maybe Eliot&#39;s idea of keeping &quot;Float&quot; in the name was best, but instead of &quot;small&quot; use &quot;immediate&quot;:<br>
&gt;<br>
&gt;       Float - BoxedFloat - ImmediateFloat<br>
&gt;<br>
&gt;       A Float is either a BoxedFloat or an ImmediateFloat, depending on the magnitude of its exponent.<br>
<br>
I don&#39;t like the idea of putting a VM/Storage detail into the Class name.<br>
The running system itself does not care about whether Floats or Integers are<br>
boxed or immediate.<br></blockquote><div><br></div><div>I disagree.  I think at least Smalltalk-80 has a philosophy of lifting as much out of the VM into the system, and hiding it from clients via encapsulation.  So unlike many other VMs the compiler is in the system, the system explicitly separates SmallInteger, LargePositiveInteger and LargeNegativeInteger and implements large integer arithmetic with Smalltalk code that uses SmallIntegers.  Note that the primitives are an optional extra optimization that the VM does not need to implement.  So for me it is in keeping with the current system to use BoxedFloat and SmallFloat or BoxedDouble and SmallDouble.</div><div><br></div><div>This lifting things up provides us with an extremely malleable system.  Pushing things down into the VM does the opposite.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  For example in RSqueakVM (aka SPy) there is no immediate<br>
Integer whatsoever. Yes, tagged ints are read during image startup but they<br>
aren&#39;t subsequently represented as immediates or tagged ints after that.<br></blockquote><div><br></div><div>Well because it&#39;s implemented above RPython I guess it is using Python&#39;s bignum code directly.  That&#39;s fine but its a bit of a cheat.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
  Just as input, in the Racket language and other Schemes,<br>
the equivalent to our SmallInterger/LargeInteger is fixnum/bignum<br>
and for floats they have flonums and &quot;extflonums&quot; (80bit).<br>
<br>
Best<br>
<span class="HOEnZb"><font color="#888888">        -Tobias</font></span></blockquote><div><br></div><div>thanks</div></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>