Hi all,
I am not sure that's what you are talking about, as there is no true immutability in the Cog VM but only read-only objects (terminology agreed upon on the VM mailing list after multiple long discussions and I will ignore further discussions on this matter), but in the case of the supported read-only objects, the VM checks if the object is read-only when performing become and *fails* the primitive if so. This is done when checking if the oop is a valid become object (hence, I believe in the case of becomeForward, only one object is checked). Among multiple reasons (implementation details, complexity, tricky cases, etc.), it was implemented this way as it is simpler and it is possible to write a work-around that way:
readOnlyObject beWritableObject.
readOnlyObject become: anotherWritableObject.
readOnlyObject beReadOnlyObject.
However, if at some point someone implements true immutability (i.e. the object cannot be modified once created immutable and cannot be writable again) in the VM, then the work-around does not work and one could consider alternatives.
Best,