CAL language report: Specification of the CAL actor language

ly, indexing is the invocation of a special function, the indexerof a given datatype. The type of the resulting expression may depend on the number and types of the indices, and of course also on the indexed object. 4.5 Mutable objects and their types Some structured types allow the modificationor mutationof an object, i.e. changing the object at some location inside it. Such a type is called mutable, and so is an object of that type. CHAPTER 4. DATA TYPES 26 Mutating objects without any restrictions would be a technique that would render a program essentially unanalyzable in the general case. For this reason, CAL imposes a number of constraints on the ability to use this feature, which will be discussed in the context of mutable variables in sections 7.1.2and7.1.3. However,CAL makes no guarantee that the various locations of an object are indeorthogonal locations pendent, i.e. that all other locations remain unaffected by an assignment. A structured mutable type whose locations are independent is calledfree, its locations are called free types orthogonal —all predefined types inCAL are of this kind if they support mutation.