Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!uunet!microsoft!jimad From: jimad@microsoft.UUCP (Jim ADCOCK) Newsgroups: comp.lang.c++ Subject: Re: deepEquality and shallowEquality revisited. Message-ID: <72150@microsoft.UUCP> Date: 3 May 91 19:29:01 GMT References: <10646@orca.wv.tek.com| <71995@microsoft.UUCP> <281EE52A.672F@tct.com> Reply-To: jimad@microsoft.UUCP (Jim ADCOCK) Organization: Microsoft Corp., Redmond WA Lines: 18 In article <281EE52A.672F@tct.com> chip@tct.com (Chip Salzenberg) writes: |In an article with which I otherwise agree, Jim Adcock writes: | |>* C++ has VERY ill-defined rules about when and where compilers may make |> a copy of an object, changing "its 'identity.'" | |Those rules describe the creation of new objects, not the changing of |old objects' identities. So 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. What you'd really like is clearer rules about if and when its legal for a compiler to make a copy. 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.