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