2010/1/17 Marcus Denker <[email protected]>:
>
> On Jan 17, 2010, at 6:57 PM, Nicolas Cellier wrote:
>> But if you really have time to pick an immutability bit in Newspeak,
>> we don't have to care anymore.
>>
> Hmm... the code below should even work with immutable strings. I *never* touch
> the string! I do not even manipulate the literal array via #at:put:...
>
> I just become the pointer to an Array generated with {}, which would not
> be immutable...
>
> So I wonder if the immutability solved the problem. (immutable literals
> do solve many other bugs when the object itself gets modified...).
>

I extrapolated a bit...
In VW, this leads to an immutability error:

('abc' become: #(1 2 3)) at: 1

Nicolas

>>> strange
>>>        'hello world' isString ifTrue: ['hello world' become: {0}].
>>>        'hello world' at: 1 put: ('hello world' at:1) + 1 .
>>>        ^'hello world'  at: 1.
>
>
>
>        Marcus
>
> --
> Marcus Denker  -- http://www.marcusdenker.de
> INRIA Lille -- Nord Europe. Team RMoD.
>
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

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

Reply via email to