home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / std / cplus / 2014 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  1.6 KB

  1. Path: sparky!uunet!psinntp!internet!sbi!pivot-sts!kirin!linke
  2. From: linke@sbi.sbi.com (User - Bill Linke)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: pointer comparisons
  5. Summary: why not restrict "object identity"?
  6. Message-ID: <1357@pivot-sts.sbi.com>
  7. Date: 9 Jan 93 01:22:33 GMT
  8. References: <1992Dec31.170223.21637@lpi.liant.com> <1993Jan7.145511.718@lpi.liant.com>
  9. Sender: news@pivot-sts.sbi.com
  10. Organization: Salomon Brothers Inc.
  11. Lines: 22
  12. Nntp-Posting-Host: kirin
  13. Originator: linke@kirin
  14.  
  15. In article <1993Jan7.145511.718@lpi.liant.com>, pkt@lpi.liant.com (Scott Turner) writes:
  16. > Identity of objects is more of the essence than storage, so it would be
  17. > problematic to define the former in terms of the latter.
  18.  
  19. Even this is not so clear, is it?  "Identity" means to me that we can
  20. distinguish between two instances of a class using only the attributes of the
  21. class itself (i.e. without using anything from derived classes which the class
  22. might happen to be a base class of).  This in turn implies that somewhere
  23. within each instance is some storage which conceptually could hold some
  24. identifying value.  (Otherwise, there would be no way for two instances to
  25. have different attributes.)
  26.  
  27. In other words, it makes more sense to me to restrict the concept of
  28. "object identity" as being meaningful *only* when applied to instances of
  29. a class which contains storage members within itself or its ancestors.
  30. (Then it doesn't really matter whether pointers to non-storage class objects
  31. compare equal or not, because there is no "identity" to be found that way
  32. in the first place.)
  33.  
  34. Bill Linke
  35. linke@kirin.sbi.com
  36.