Re: Renaming versus initialisation



"Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx> wrote:
>On 27 Sep 2005 20:00:56 -0400, Robert A Duff wrote:
>
>> Tapio Kelloniemi <invalid@xxxxxxxxxxxxxxxxxxxxxxxxx> writes:
>>
>>> V1 : T := F;
>>> V2 : T renames F;
>>>
>>> I'd like to see an explanation of the effect of an object renaming
>>> declaration versus variable declaration and initialisation, when the object
>>> being renamed is a return value of a function. Many thanks for it.
>>
>> They are pretty similar.
>
>What about difference in respect to creation of new objects?

Renaming creates a new object as does initialisation, when not
returning by reference (return value is copied = new object is created).

--
Tapio
.