comp.lang.ada
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.cygnus.argh.org>
Subject: "Moving" objects of limited type
Date: 2000/06/03
Date: 2000-06-03T20:55:31+00:00	[thread overview]
Message-ID: <87wvk6xz5p.fsf@deneb.cygnus.argh.org> (raw)

For some limited types, it seems to be worthwhile to have an operation
which moves the "value" (whatever this means) from one location to
another, destroying the original "value".  Usually, this is much
more efficient than a traditional "copy" where the "value" has to be
duplicated.

For a concrete example, consider a limited string type where the
actual characters are allocated on the heap.  This operation could be
described in the following way:

   procedure Do_Something
     (Source : in out Mutable_String;
      Target : in out Mutable_String);
   --  Assign the value of Source to Target, and then assign the
   --  empty string to Source.  This is much faster than Copy, but it
   --  destroys the Source object.

Now my question: What's an appropriate name for such an operation?
"Move", "Relocate", "Rename", "Teleport"?  Maybe this operation is
quite common, and in this case I want to use the correct term.




             reply	other threads:[~2000-06-03  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-03  0:00 Florian Weimer [this message]
2000-06-04  0:00 ` "Moving" objects of limited type Pascal Obry
2000-06-04  0:00 ` Nick Roberts
2000-06-05  0:00 ` Marin D. Condic
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox