Xref: utzoo comp.lang.eiffel:1695 comp.object:3813 Newsgroups: comp.lang.eiffel,comp.object Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!yale.edu!cmcl2!uupsi!mstr!mstr!jcm From: jcm@mstr.hgc.edu (James McKim) Subject: Re: Reference Semantics Message-ID: <1991Jun26.133627.11235@mstr.hgc.edu> Sender: Usenet@mstr.hgc.edu (Action News Central) Nntp-Posting-Host: sc3.hgc.edu Reply-To: jcm@mstr.hgc.edu (James McKim) Organization: The Hartford Graduate Center, Hartford CT. References: <133154@tut.cis.ohio-state.edu> <1991Jun12.072557.7282@jyu.fi> <133644@tut.cis.ohio-state.edu> <1991Jun14.073249.1469@jyu.fi> <1193@tetrauk> Date: Wed, 26 Jun 91 13:36:27 GMT In article <1193@tetrauk.UUCP> rick@tetrauk.UUCP (Rick Jones) writes: > From Eiffel 2.2 onwards >(that's nearly 2 years ago), a class variable can be declared as "expanded". >This means it gets value semantics - i.e. every assignment is a copy. Eiffel 3 >allows a _class_ to be declared as expanded, so every instance is distinct. In >fact, in ISE's version of Eiffel 3, expanded objects will be _implemented_ >using references, but the compiler will enforce _value_ semantics - i.e. it >will guarantee no aliasing. > Rick, In version 2.3 there is a restriction on the base class of an expanded type. Namely its Create routine can have no parameters. Also, declaring and using an instance of an expanded type is legal without explicitly calling Create, but does not automatically result in the initialization of the expanded object's attributes or the execution of the Create routine. Consequently I have restricted my use of expanded types mainly to stateless objects such as those containing only constants and simple queries. Does version 3 address these issues? > >-- >Rick Jones, Tetra Ltd. Maidenhead, Berks, UK rick@tetrauk.uucp >Chairman, NICE (Non-profit International Consortium for Eiffel) > >Any fool can provide a solution - the problem is to understand the problem -- Jim *------------------------------------------------------------------------------* Jim McKim (203)-548-2458 _Give_ people fish and they eat for a day. Internet: jcm@mstr.hgc.edu _Teach_ people to fish and they eat for a lifetime.