Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!sdd.hp.com!caen!uflorida!screamer!tscs!tct!chip From: chip@tct.com (Chip Salzenberg) Newsgroups: comp.lang.c++ Subject: Re: deepEquality and shallowEquality revisited. Message-ID: <2829804C.6A5A@tct.com> Date: 9 May 91 17:00:59 GMT References: <71995@microsoft.UUCP> <281EE52A.672F@tct.com> <72150@microsoft.UUCP> Organization: Teltronics/TCT, Sarasota, FL Lines: 34 According to jimad@microsoft.UUCP (Jim ADCOCK): >In article <281EE52A.672F@tct.com> chip@tct.com (Chip Salzenberg) writes: >|I would consider object copying rules to be a separate issue from >|object identity determination. > >This kind of depends on one's perspective. As a programmer, if you get >a copy made unexpectedly by some compiler, where you expect the original >instead, then the identity you get is not the one you expected. The fact >that you get the wrong object along with the wrong identity doesn't help >you much. If the copy can be identified as a copy because its identity is detectably different (which, in ARM C++, it is), then copying and identity become entirely unrelated issues (which, in ARM C++, they are). >What you'd really like is clearer rules about if and when its legal for >a compiler to make a copy. I am happy with the clarity of the rules: I think that I understand them. I am not happy with their laxity, however, and wish that the implementor's latitude in this area were reduced. >The idea that a compiler can introduce a "temporary" copy if and when it >chooses kind of makes OOP difficult -- or at least non-portable. Some things are difficult, yes; though I tend to avoid circumstances in which copying is optional. Non-portable, no -- just be careful not to ass_u_me that a copy will or will not be made in circumstances which allow both. -- Brand X Industries Sentient and Semi-Sentient Being Resources Department: Because Sometimes, "Human" Just Isn't Good Enough [tm] Chip Salzenberg ,