Views and view changes Sample Clauses
Views and view changes. Views. If two classes are shared, a single object might be treated as an instance of either one. Each class is a distinct view of that object. A J&s object can have any number of views, all equally valid. This contrasts with an ordinary object-oriented language like Java (or even J&), where an object has exactly one view: its run- time class.
Views and view changes. Views. If two classes are shared, a single object might be treated as an instance of either one. Each class is a distinct view of that object. A J&s object can have any number of views, all equally valid. This contrasts with an ordinary object-oriented language like Java (or even J&), where an object has exactly one view: its run- time class. In J&s, an object reference is not just a heap location; it is essentially a pair l, T of a heap location l and a type T , where T is the view, represented as a non-dependent exact type. The view T determines the behavior of the object when accessed through that reference.
