Fun with Number readFrom: What should we do ?

stéphane ducasse ducasse at iam.unibe.ch
Thu Apr 27 07:31:28 UTC 2006


Nicolas

I would:
	write some Unit tests that cover all the bugs you identified.
	propose a fix.
I agree with andreas and relying on '' as 0 is indeed a problem but  
we should improve stepwise.

Stef

On 27 avr. 06, at 00:18, nicolas cellier wrote:

> I fully agree, but since it is a long living bug, present in other  
> dialects,
> maybe someone have used it as a feature, so it's better asking.
>
> What about the FORTRANISH 1.e1 and .1e2 ? Anyone use it ?
> I like it because i had apps reading this kind of format, but maybe  
> my opinion
> is biased... Another specific selector able to read +.1e+2 might be  
> better...
> One point of view is to enforce Smalltalk syntax only in readFrom:
> On the other hand we have already the nan and infinity exceptions...
>
> Nicolas
>
> Le Mercredi 26 Avril 2006 23:45, Andreas Raab a écrit :
>> Clearly, that's a bug not a feature. And it should raise an  
>> exception -
>> the empty string is *not* a valid zero value (but if anyone needs  
>> that
>> behavior they can handle the exception). About stream rewinding:  
>> Doesn't
>> matter - I don't think anyone should rely on stream positioning in  
>> the
>> case of an error.
>>
>> Cheers,
>>    - Andreas
>
>
>




More information about the Squeak-dev mailing list