Begin forwarded message:

From: nicolas cellier <[EMAIL PROTECTED]>
Date: August 31, 2008 2:13:10 AM CEDT
To: [EMAIL PROTECTED]
Subject: [squeak-dev] Number readFrom: can we remove some "accidental" features Reply-To: The general-purpose Squeak developers list <[EMAIL PROTECTED] >


Strangely, Squeak Number class>>#readfrom: used to accept non Smalltalk syntax like:
(Number readFrom: '.2') -> 0.2 .
(Number readFrom: '2.e3') -> 2000.0 .

(See 
http://lists.squeakfoundation.org/pipermail/squeak-dev/2006-April/103137.html)

Don't know if accidental or on purpose, but to me, this is wrong and I did not implement this behavior in SqNumberParser because there is no such official Smalltalk syntax to my knowledge.

Up to any one to accept an alternate number syntax by subclassing SqNumberParser.

Now I see that Dave Lewis (dtl) asserted this feature:

testAsNumberWithSuperfluousDecimalPoint
        | sd |
        sd _ '123.s2' asNumber.
        self assert: ScaledDecimal == sd class.
        self assert: sd scale == 2.
        self assert: '123.00s2' = sd printString.

I'd like to remove this feature.
Is it ok?





_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to