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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9f3d09bde7b33b5d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-04-13 01:46:24 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!dialin-145-254-039-187.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Pass by reference Date: Tue, 13 Apr 2004 10:46:13 +0200 Organization: At home Message-ID: References: <19b0e504.0404080652.4eab9f80@posting.google.com> <19b0e504.0404090438.7e800536@posting.google.com> <87n05i4rdp.fsf@deneb.enyo.de> <871xmtv0pz.fsf@beeblebrox.enst.fr> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-039-187.arcor-ip.net (145.254.39.187) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.uni-berlin.de 1081845983 1321391 I 145.254.39.187 ([77047]) User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:7036 Date: 2004-04-13T10:46:13+02:00 List-Id: Samuel Tardieu wrote: >>>>>> "Dmitry" == Dmitry A Kazakov writes: > > Dmitry> When T is in a register it might be more efficient than > Dmitry> by-reference. But let the compiler decide it knows better. > > If T is an object, its tag alone (likely to be an address in many > implementations) will already take the whole space in the register. The beauty of Ada's OO concept is that T need not to have any tag, as opposed to T'Class. With by-reference parameter passing it is almost no matter, but for by-copy one it makes much sense to keep T and T'Tag separate. For example, one could have Boolean and Boolean'Class. -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de