[Vm-dev] Re: Immutability, newspeak (was: Vm-dev post from jbaptiste.arnaud@gmail.com requires approval)

stephane ducasse stephane.ducasse at gmail.com
Wed Jun 9 20:27:53 UTC 2010


> You think its cheap to scan methods for mutablity??  Remember you have to identify inst var writes not just mutating primitives like at:put:.

in our experimentation on doing a per reference flow of security property (pure research) we have to check all the iv store and this is not 
something I would do on a real solution. 

I have the impression that the immutability bit can give us an opportunity to slowly build a more secure system. 
What I like is that it is simple to understand and we can build alternate and enhanced solution. Even if for us it uses a bit that we like to have to 
create strange ideas. 

> 
> BTW, I implemented a per-class scheme ages ago in above BrouHaHa (in a Smalltalk-80 v2.3 derived image) to provide immutable literals.  It worked badly for literals since 'foo' class ~~ 'foo' copy class (one needs an ImmutableByteString class and a ByteString class for every class one wants to make immutable).

Eliot I did not get that why for every class

>  Lots of the system was affected by the change since the store string of a mutable string ends up being
>     'the immutable string literal' copy
> to get a mutable string.
> 
> Our experience with VisualWorks was different.  Lots of methods had to be changed because they were attempting to update immutable literals.  There were lots of 
>     stream := '' writeStream.
> throughout the system which had not been noticed.

Yes this would be nice to spot such places. I would really like to know other cases where immutability helped VW. 
Do you have some anecdotes?
Since it required an effort to bring that in VW, what was the selling argument at that time for getting it into the system?

>  But unlike the BrouHaHa experience the changes only affected violations of immutability.  In BrouHaHa the changes were due to trying to accommodate the clumsy class-based scheme.
> 
> cheers,
> Eliot
> 
> 
> > Cheers,
> >  - Andreas
> >
> 
> 
> 
> --
> Best regards,
> Igor Stasenko AKA sig.
> 



More information about the Vm-dev mailing list