<div dir="ltr">Hi Levente,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 7, 2014 at 11:47 AM, Levente Uzonyi <span dir="ltr"><<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Thu, 7 Aug 2014, Eliot Miranda wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Juan,<br>
<br>
On Thu, Aug 7, 2014 at 9:40 AM, J. Vuletich (mail lists) <<a href="mailto:juanlists@jvuletich.org" target="_blank">juanlists@jvuletich.org</a>> wrote:<br>
<br>
Hi Folks,<br>
<br>
Just tried Smalltalk-80 (actually Apple Smalltalk-80 running in Mini vMac).<br>
1e-3 "printIt" (1/1000)<br>
1e-3 class "printIt" Fraction<br>
1e3 "printIt" 1000<br>
1e3 class "printIt" SmallInteger<br>
<br>
This has always been the behavior in Squeak too.<br>
<br>
<br>
What happens if you try compiling a method containing a literal Fraction and both debug it and decompile it. <br>
<br>
Also check these comments from Dan: <a href="http://lists.squeakfoundation.org/pipermail/squeak-dev/2000-March/013368.html" target="_blank">http://lists.squeakfoundation.<u></u>org/pipermail/squeak-dev/2000-<u></u>March/013368.html</a><br>
<br>
<br>
Dan doesn't say anything about Fraction literals in this message.<br>
</blockquote>
<br></div>
I guess the key parts are<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Lowercase 'e' is used to designate the exponent of a floating point<br>
number (as are 'd' and 'q'). It is illegal to specify an exponent for<br>
what is otherwise an integer--eg, 10e10 is illegal, while 10.0e10 is<br>
legal.</blockquote></blockquote></blockquote><div><br></div><div>Right, which I see as orthogonal to the literal Fractions issue.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
and<br>
<br>
"Radix, digits and exponent defined analogously over ints, largeInts, and Floats."<div class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
I don't think this is a bug at all.<br><br>
What, that 1e-3 is a Fraction, not a Float?<br>
</blockquote>
<br></div>
If 1e-3 is a Float, shouldn't 1e3 be a Float too?</blockquote><div><br></div><div>I don't see that follows. If 1e3 is an Integer, does that imply 1e-3 is a Fraction? The point is that 1e-3 can be represented either as a Float or a Fraction, but that Fraction is not a literal. So in choosing how it is represented the choice having the least impact on the language semantics is as a Float. At least, for me.</div>
<div><br></div><div>If people feel strongly that Fraction should be literal then let's make it so. But so far I'e not seen much passion or any compelling arguments that we make that choice. However, compatibility with other dialects, and the existing definitions of isLiteral imply using Floats not Fractions.</div>
</div>-- <br>best,<div>Eliot</div>
</div></div>