19 Apr 2012 15:05
immutable objects
In section 9.1 of his unusual Ph.D. thesis, Mark S. Miller defines the object-capability model. Data is defined to be immutable information. An instance, on the contrary, combines code and state. The latter is a mutable map from indices to references. A capability is defined as a reference to non-data, i.e., to an instance, a device or a loader. What about deeply immutable instances, like an immutable Point or an immutable Date or even more complex immutable instances like an immutable Person that maintains references to an immutable Address in addition to Strings for names and a birth Date? Are they only information? Is a reference to such an instance a capability? On the other hand, is an instance to an immutable object (e.g., java.math.BigInteger) simply data or is a reference to it a full capability, even if it points to immutable information? In other words, where is the boundary between data and immutable instances?
RSS Feed