From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,17251c4a1886ffce,start X-Google-Attributes: gid103376,public From: Florian Weimer Subject: "Moving" objects of limited type Date: 2000/06/03 Message-ID: <87wvk6xz5p.fsf@deneb.cygnus.argh.org>#1/1 X-Deja-AN: 630696046 Mail-Copies-To: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@cygnus.argh.org X-Trace: deneb.cygnus.argh.org 960065731 31717 192.168.1.2 (3 Jun 2000 20:55:31 GMT) Organization: Penguin on board User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.6 Mime-Version: 1.0 Reply-To: Florian Weimer NNTP-Posting-Date: 3 Jun 2000 20:55:31 GMT Newsgroups: comp.lang.ada Date: 2000-06-03T20:55:31+00:00 List-Id: 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.