Consequences of Identity
Identity of objects allows objects to be treated as black boxes. The object need not expose its internal structure. It can still be referred to, and its other properties can be accessed via its external behaviour associated with the identity. The identity provides a mechanism for referring to such parts of the object that are not exposed in the interface. Thus, identity is the basis for polymorphism in object-oriented programming.
Identity allows comparison of references. Two references can be compared whether they are equal or not. Due to the identity property, this comparison has special properties. If the comparison of references indicates that the references are equal, then it's clear that the two objects pointed by the references are the same object. If the references do not compare equal, then it's not necessarily guaranteed that the identity of the objects behind those references is different. The object identity of two objects of the same type is the same, if every change to either object is also a change to the other object.
Read more about this topic: Identity (object-oriented Programming)
Famous quotes containing the words consequences of, consequences and/or identity:
“The medium is the message. This is merely to say that the personal and social consequences of any mediumthat is, of any extension of ourselvesresult from the new scale that is introduced into our affairs by each extension of ourselves, or by any new technology.”
—Marshall McLuhan (19111980)
“The medium is the message. This is merely to say that the personal and social consequences of any mediumthat is, of any extension of ourselvesresult from the new scale that is introduced into our affairs by each extension of ourselves, or by any new technology.”
—Marshall McLuhan (19111980)
“During the first formative centuries of its existence, Christianity was separated from and indeed antagonistic to the state, with which it only later became involved. From the lifetime of its founder, Islam was the state, and the identity of religion and government is indelibly stamped on the memories and awareness of the faithful from their own sacred writings, history, and experience.”
—Bernard Lewis, U.S. Middle Eastern specialist. Islam and the West, ch. 8, Oxford University Press (1993)