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-09 06:03:28 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!dialin-145-254-039-075.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Pass by reference Date: Fri, 09 Apr 2004 15:03:12 +0200 Organization: At home Message-ID: References: <19b0e504.0404080652.4eab9f80@posting.google.com> <19b0e504.0404090438.7e800536@posting.google.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-039-075.arcor-ip.net (145.254.39.75) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.uni-berlin.de 1081515807 91889902 I 145.254.39.75 ([77047]) User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:6902 Date: 2004-04-09T15:03:12+02:00 List-Id: Dan McLeran wrote: > Stephen Leake wrote: >> Why would you want to pass a tagged type by copy? Because that could be a handle requiring Initialize/Adjust/Finalize. To be honest, forcing tagged types to be by-reference was probably a mistake. > I don't necessarily want to. I actually would never do this in C++, > unless the class was something very small and intended to be passed by > value: > > struct Silly > { > int i; > }; This need not to be tagged, because there is no dispatching subroutines here. A rough C++ equivalent of a tagged type is a class with virtual functions. -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de