1. A computer implemented method for copy-on-writes of immutable objects of a class-based object-oriented language, the computer implemented method comprising: marking an immutable object within a heap memory as read-only to form a read-only object, wherein the immutable object is marked as the read-only object within a garbage collection cycle of the class-based object-oriented language, wherein the immutable object is stored in read-only storage to form the read-only object to delay copying of the immutable object until a runtime determination is made that a write to the immutable object will be made, and wherein delaying copying of the immutable object optimizes a copy-on-write of the immutable object; responsive to an attempt to write to the read-only object within the heap memory, 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.