Very strange bug on Streams and probably compiler

stephane ducasse stephane.ducasse at free.fr
Wed Feb 14 17:42:11 UTC 2007


On 14 févr. 07, at 17:48, Lukas Renggli wrote:

>> As Bert wrote: it's normal :)
>
> I agree, looks completely normal to me.

Is it normal for you that the same strings typed in two different  
methods are different but
if they are typed in the same method they are the same?

I never saw that in the books I read on smalltalk but they can be all  
wrong and squeak right.

Stef

>
>> [Okay okay other languages have immutable string, but this is  
>> Smalltalk.]
>
> If we had an immutability bit, that the compiler would set for objects
> in the literal array (and with what we could do a lot of other cool
> stuff), then people would not run into such problems.

Exact.
Or the compiler could just optimize immutable objects we have:  
#symbol, boolean, integers.....

Stef
>
> Cheers,
> Lukas
>
> -- 
> Lukas Renggli
> http://www.lukas-renggli.ch
>
>




More information about the Squeak-dev mailing list