[squeak-dev] 16rff broke 16r8e7

David T. Lewis lewis at mail.msen.com
Tue Feb 16 00:47:13 UTC 2010


On Sun, Feb 14, 2010 at 09:22:55PM +0100, Nicolas Cellier wrote:
> As you may know, with 16rff change, we cannot anymore use a radix
> notation combined with an exponent notation.
> At least for base > 14, the exponent letter is taken as an ordinary digit.
> The options are:
> 
> 1) revert the change
> 
> 2) abandon combined radix+exponent notation
> all the code for printing Float with different radix, and also for
> scanning can be removed
> Or I can provide a subclass of SqNumberParser for backward compatibility.
> 
> 3) find a new syntax for radix+exponent
> 
> For example, 16r7f_e6 16r7f^6 16r7f#6
> None of these is ambiguous with existing code.
> 
> Or maybe use an uppercase R for uppercase only digits...
> 
> 4) use q exponent to at least enable base 16
> This is hackish and not universal, but I guess hardly anybody ever
> used a base > 16.
> 
> -------------------------------------
> 
> What would squeak/pharo folks choose ?
> 

For the default behavior in Squeak, I prefer #1 for the reasons explained here
(thanks to Bert for the reference):

  http://lists.squeakfoundation.org/pipermail/squeak-dev/2000-March/013368.html

I also think that SqNumberParser enables some flexibility, and if it can be
used to accept a more convenient another syntax (16rff) for the benefit of
people doing serious data conversion and numeric work, this would be a very
good thing.

To me, the "micro world of simplicity and generality" idea is more important
than syntactic convenience. Encouraging understanding and exploration is
important, and the annoynance of having to write some extra data conversion
code seems a small price to pay.

Dave




More information about the Squeak-dev mailing list