Hi again<br><br><div class="gmail_quote">2009/3/20 Göran Krampe <span dir="ltr">&lt;<a href="mailto:goran@krampe.se">goran@krampe.se</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Howdy folks!<br>
<br>
In working on Tirade I stumbled upon SqNumberParser and its history:<br>
<br>
<a href="http://bugs.squeak.org/view.php?id=3512" target="_blank">http://bugs.squeak.org/view.php?id=3512</a><br>
<br>
...it was added to the image in 3.9 but not hooked into Scanner - Scanned still uses Number class&gt;&gt;readFrom:.<br>
<br>
Now... In Tirade I can use whichever - but using SqNumberParser makes it more correct, and quite faster - although &quot;less portable&quot; since I would depend on it. I will now make Tirade use SqNumberParser *if present* in the image, otherwise fall back on Number class&gt;&gt;readFrom:. This opens up some slight potential incompatibility issues, but whatever.<br>

<br>
Question: Is there anything stopping 3.9+ including Pharo to start using SqNumberParser from Scanner&gt;&gt;xDigit?<br>
<br>
And oh, the class name is not so good IMHO, why the Sq prefix?<br>
</blockquote><div><br>The history starts here <a href="http://lists.squeakfoundation.org/pipermail/squeak-dev/2006-April/103137.html">http://lists.squeakfoundation.org/pipermail/squeak-dev/2006-April/103137.html</a><br>I think Diego Fernandez first proposed to use a class for parsing Numbers,<br>
but then Francisco Garau prepended a Sq (to emphasize Squeak peculiarities?) and the name remained as is...<br>I am also equipped with a FORTRAN, a Dolphin and a VW Number parser, and guess what ? Smalltalk syntax vary...<br>

...But I agree, Squeak Academy should discuss new names entering in the Smalltalk dictionary ;)<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
And yeah, class var not used in SqNumberParser: BelllerophonBase10 :)</blockquote><div><br>Yes remove it, it was used once in early days, before I correct conversions Integer&gt;&gt;asFloat Fraction&gt;&gt;asFloat<br>(all started from here <a href="http://lists.squeakfoundation.org/pipermail/squeak-dev/2006-April/102465.html">http://lists.squeakfoundation.org/pipermail/squeak-dev/2006-April/102465.html</a>)<br>
<br>There is more at:<br><a href="http://bugs.squeak.org/view.php?id=7169">http://bugs.squeak.org/view.php?id=7169</a><br><a href="http://bugs.squeak.org/view.php?id=6779">http://bugs.squeak.org/view.php?id=6779</a><br><a href="http://bugs.squeak.org/view.php?id=7174">http://bugs.squeak.org/view.php?id=7174</a><br>
<a href="http://bugs.squeak.org/view.php?id=6976">http://bugs.squeak.org/view.php?id=6976</a><br><a href="http://bugs.squeak.org/view.php?id=6982">http://bugs.squeak.org/view.php?id=6982</a><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
regards, Göran<br>
<br>
</blockquote><div><br>And still, one thing lacks, a proper NumberParserException...<br><br>Nicolas<br></div></div><br>