Very strange bug on Streams and probably compiler

Roel Wuyts Roel.Wuyts at ulb.ac.be
Wed Feb 14 22:16:23 UTC 2007


Sure, I fully agree.

The essence of the discussion boils down whether whether you consider

'foo'

to be a literal or not in the current system.


On 14 Feb 2007, at 14 February/21:59, Alan Lovejoy wrote:

> <Lukas Renggli>
> 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.
> </Lukas Renggli>
>
> As a principle of language design, literals should be immutable. And
> immutability needs to be independently settable for each named  
> instance
> variable, and independently settable for the indexable slots (as a  
> group,
> not for each index.)  The reason is because some named instance  
> variables
> may need to be "caching variables" whose values are lazily computed  
> only
> when needed--in fact, such variables may need to be weak references  
> so that
> the garbage collector can set them to nil.
>
> --Alan
>
>
>




More information about the Squeak-dev mailing list