home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!inews.Intel.COM!tcad05!bongalon
- From: bongalon@tcad05.intel.com (Ben Bongalon)
- Newsgroups: comp.object
- Subject: Re: Object hidden state and side effects
- Message-ID: <BzF7tn.22C@inews.Intel.COM>
- Date: 17 Dec 92 20:34:34 GMT
- References: <1992Dec14.175402.1889@crd.ge.com> <1992Dec15.143243.16256@heeg.de> <1992Dec15.224536.13554@crd.ge.com> <BzC05w.2xA@newsflash.concordia.ca> <1992Dec17.001046.27321@crd.ge.com> <knight.724558491@cunews>
- Sender: news@inews.Intel.COM (USENET News System)
- Reply-To: bongalon@tcad05.intel.com (Ben Bongalon)
- Organization: Intel Corporation, Santa Clara, CA USA
- Lines: 39
- Nntp-Posting-Host: tcad05
-
-
- In article <knight.724558491@cunews>, knight@mrco.carleton.ca (Alan
- Knight) writes:
- |> In <1992Dec17.001046.27321@crd.ge.com> eaker@ukulele.crd.ge.com
- (Chuck Eaker) writes:
- |>
- |> >the domain of imaginary numbers. If we implement this domain as
- |> >instances of a class that we create on the fly as needed, we could
- |> >well have multiple instances of the same imaginary number around.
- |> >Thus, it is possible to confuse tests for identity with tests for
- |> >equality. But ordinary people don't think of this as being
- |> >possible with imaginary numbers because two imaginary numbers are
- |> >identical iff they are equal.
-
- i'm lost here. as i see it, the only way one would have multiple
- instances of the same imaginary number around is if a value can be
- represented in multiple ways. but how can that occur if all expressions
- that can be used to represent a value evaluates to the same thing?
-
- |> Strangely enough, I think the two sides may be beginning to understand
- |> each other. It is true that if you use identity tests instead of
- |> equality, that it is possible to distinguish multiple instances of
- |> classes where this doesn't make very good intuitive sense.
- |>
- |> However, what does identity mean for a value. If you tell a
- |> mathematician that two imaginary numbers are identical iff they are
- |> equal she will probably ask you what identity means?
-
- Here's an example:
-
- 1 + 2i == (3-2) + (6/3)i == 1 + 2(i^5)
-
- they all evaluate to the same value and can be normalized into
- a unique representation. thus, all 3 expressions are equal
- (identical). how can one get multiple copies?
-
-
- Ben Bongalon
- Intel Corporation
-