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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f5508b044317ceed X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!130.81.64.211.MISMATCH!cycny01.gnilink.net!spamkiller2.gnilink.net!gnilink.net!trndny04.POSTED!0e8a908a!not-for-mail From: Hyman Rosen User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Question about controlled types. References: <47aa5ca6$0$32487$4d3efbfe@news.sover.net> In-Reply-To: <47aa5ca6$0$32487$4d3efbfe@news.sover.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Thu, 07 Feb 2008 04:54:06 GMT NNTP-Posting-Host: 71.249.28.16 X-Complaints-To: abuse@verizon.net X-Trace: trndny04 1202360046 71.249.28.16 (Wed, 06 Feb 2008 23:54:06 EST) NNTP-Posting-Date: Wed, 06 Feb 2008 23:54:06 EST Xref: g2news1.google.com comp.lang.ada:19721 Date: 2008-02-07T04:54:06+00:00 List-Id: Peter C. Chapin wrote: > 3. Copy the components of the anonymous object to A without using Adjust. This is ill-advised. Objects may hold pointers to their own submembers. If you assign without adjusting, those internal pointers will point to the anonymous object, not to A. There are reasons for doing assignment like this in Ada (or at least I think so - I don't really know Ada), but the C++ assignment operator model is much cleaner.