From: Eric B. <er...@go...> - 2008-03-29 13:36:26
|
Colin Paul Adams wrote: >>>>>> "Eric" == Eric Bezault <er...@go...> writes: > > Eric> That does not work in Eiffel. Each time you will access the > Eric> expanded C, you will not get a reference to it but a copy of > Eric> it. > > That's what I was afraid of. > > Perhaps we should have a syntax for this - reference assignment (note > that I don't know if I can benefit from this or not - but even if I > can't there are surely applications that can). In Eiffel, expanded does not mean that its memory is a subpart of the memory of another object (this is the compiler which does -- or possibly does not -- optimize it in such a way). What Eiffel means by expanded is that an expanded object cannot be shared by two different objects, and as a consequence the language talks about expanded in terms of copy semantics. Allowing reference assignment as you suggest would just open a can of worms in the language definition. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |