Re: Memory allocation overhead
Eric Bezault <[email protected]>
| Newsgroups | gmane.comp.lang.eiffel.gobo.devel |
|---|---|
| Message-ID | <[email protected]> |
Colin Paul Adams wrote: >>>>>> "Eric" == Eric Bezault <[email protected]> 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:[email protected] http://www.gobosoft.com ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace