Xref: utzoo comp.lang.eiffel:1688 comp.object:3782 Newsgroups: comp.lang.eiffel,comp.object Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!barmar From: barmar@think.com (Barry Margolin) Subject: Re: Reference Semantics Message-ID: <1991Jun23.170200.15514@Think.COM> Sender: news@Think.COM Reply-To: barmar@think.com Organization: Thinking Machines Corporation, Cambridge MA, USA References: <1991Jun19.001829.28317@syacus.acus.oz.au> <1991Jun21.215959.13966@cis.ohio-state.edu> <1991Jun22.175434.21450@cunews.carleton.ca> Date: Sun, 23 Jun 91 17:02:00 GMT Lines: 24 In article <1991Jun22.175434.21450@cunews.carleton.ca> knight@mrco.carleton.ca (Alan Knight) writes: >In article <1991Jun21.215959.13966@cis.ohio-state.edu> ogden@seal.cis.ohio-state.edu (William F Ogden) writes: >>At the risk of getting back into those dangerous analogies, note that >>referencs semantics really entail multiple larger objects routinely sharing >>possesion of smaller objects. For very good reasons, this rarely happens >>in the real world. Imagine, for example, several people in a room each >>possesing a remote tuner for the room's only television set. > In fact, in the "real" world that I live in, objects are usually >shared, and copying is fairly rare. At my house, we have one >television set which is shared between all the residents. It's true >that there's only one remote control And reference semantics still make sense for the remote control as well, precisely *because* there's only one. If you give the remote control to your wife, then you must drop your reference to it and she must add her reference to it. However, it's still the same remote control, and any state (its color, the strength of its battery, its serial number, and, most importantly, its *identity* (in languages that support identity, rather than equivalence, testing)) must be maintained when moving it. -- Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar