<div dir="ltr">Hi Levente,<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 6, 2014 at 11:43 AM, Levente Uzonyi <span dir="ltr">&lt;<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Wed, 6 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 All,<br>
    Squeak trunk also suffers from the Float parsed as a Fraction bug:<br>
<br>
1e-8 class Fraction<br>
1.0e8 class Float<br>
</blockquote>
<br></div>
I&#39;m not entirely sure about it being a bug. I&#39;ve checked Squeak 3.8 (pre-SqNumberParser), and it also parsed that literal as a Fraction. If I want a Float, I can be explicit and use 1.0e-8.<br></blockquote><div><br>
</div><div>IMO it very much *is* a bug.  Smalltalk-80 has never supported Fraction literals.  They&#39;re always written as division expressions.  Fraction answers false to isLiteral.  Just because it worked that way doesn&#39;t mean it was right.  I suspect no one noticed.  Allowing Fraction literals feels like a big change to me.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I made a modified version of Fraction &gt;&gt; #printOn:base: which outputs the literal format if possible. The change &quot;fixes&quot; the debugger (note that itw was way less broken in Squeak than in Pharo anyway).<br>

The only drawback I found is that some fractions become a bit more &quot;complex&quot; when printed, e.g. 3/4 =&gt; 75e-2</blockquote><div><br></div><div>OK, but is this the right fix?  What does everybody think?  Keep the language unchanged or add Fraction literals and add another incompatibility with other dialects?</div>
<div><br></div><div>If Fractions are literals</div><div>- what is the semantics of 1/0 (easy, it is not a literal, but needs to be stated)?</div><div>- what is [1/0.1] on: ZeroDivide do: [:ex| #error] ?  Is it 10.0 or #error, i.e. is 1/0.1 10.0 or 1 / 0 followed by the Integer 1?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888">Levente<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

--<br>
eek! Eliot</blockquote></font></span></blockquote></div>-- <br>best,<div>Eliot</div>
</div></div>