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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1b3cf847f22f6902 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-18 20:27:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!snoopy.risq.qc.ca!newsfeed.news2me.com!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!news.chatlink.com!not-for-mail From: "Keith" Newsgroups: comp.lang.ada Subject: Re: Array type conversion Date: Fri, 18 Oct 2002 20:27:00 -0700 Organization: OWDS Inc. Sender: e27182818@dialup-63.209.92.151.dial1.losangeles1.level3.net Message-ID: References: NNTP-Posting-Host: dialup-63.209.92.151.dial1.losangeles1.level3.net X-Trace: news.chatlink.com 1034998023 3110 63.209.92.151 (19 Oct 2002 03:27:03 GMT) X-Complaints-To: abuse@chatlink.com NNTP-Posting-Date: Sat, 19 Oct 2002 03:27:03 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:29935 Date: 2002-10-18T20:27:00-07:00 List-Id: But generating the code to do a simple copy versus a more complex conversion based upon whether the subtype representations are the same or not does not seem to be much of an inefficiency. "> A derived type needs not have the same representation as its ancestor type. > If the subtypes statically match, the compiler can perform a simple memory > copy. Otherwise, the compiler must in effect generate the exact equivalent > of the loop you give, and there is a deliberate decision in Ada to avoid, as > far as possible, *hidden* inefficiencies. > > -- > --------------------------------------------------------- > J-P. Rosen (rosen@adalog.fr) > Visit Adalog's web site at http://www.adalog.fr > >