1. A computer implemented method for copy-on-writes of immutable objects, the computer implemented method comprising: marking an immutable object as read-only to form a read-only object; responsive to an attempt to write to the read-only object, copying an internal value of the read-only object to a read-and-write storage using runtime information to form a writable copy of the read-only object; and updating a set of references for the read-only object to point to the writable copy of the read-only object.