Jump to content

Talk:Identity (object-oriented programming)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Rp (talk | contribs) at 16:14, 23 June 2016 (Identity is a property of objects?: new section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

often not useful?

I'm rewriting this paragraph:

Object identity is often not useful, if referential transparency is assumed, because identity is a property that an object may contain, aspects that are not visible in its interface. Thus, objects need to be identified in the interface with a mechanism that is distinct from the methods used to access the object's state in its interface. With referential transparency, the value of the state of the object would be identical or isomorphic with the values accessible from the object's interface. There would be no difference between the object's interface and its implementation, and the identity property would provide no useful additional information.

Reasons:

  1. . Weasel word: often not useful. How often? To Whom?
  2. . Grammar: first sentence is a run-on which makes no sense.
  3. . Semantic confusion: the author of the paragraph is almost certainly misusing the term "referential transparency", which has to more to do with symbol bindings and environments in program code.

I think I know what the author is getting at and believe I can rescue the paragraph. 192.139.122.42 (talk) 00:42, 26 November 2011 (UTC)[reply]

Identity is a property of objects?

I find it confusing to see identity described as a property of objects. In most object-oriented languages, objects have properties, i.e. they can be specified using a language construct. Identity is not such a property. Rather, it is a fundamental characteristic of *all* objects in object-oriented languages in general. So I believe some rewording is in order. Rp (talk) 16:14, 23 June 2016 (UTC)[reply]