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.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,75a8a3664688f227 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-08 04:25:30 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: dmitry6243@my-deja.com Newsgroups: comp.lang.ada Subject: Re: Parameter Modes, In In Out and Out Date: Mon, 08 Jan 2001 12:06:48 GMT Organization: Deja.com Message-ID: <93cagm$c1j$1@nnrp1.deja.com> References: <7Cx56.90736$A06.3322588@news1.frmt1.sfba.home.com> <937jab$s23$1@nnrp1.deja.com> <3A57CD7F.2228BFD5@brighton.ac.uk> <938p3u$omv$1@nnrp1.deja.com> NNTP-Posting-Host: 212.79.194.99 X-Article-Creation-Date: Mon Jan 08 12:06:48 2001 GMT X-Http-User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20001108 Netscape6/6.0 X-Http-Proxy: 1.1 x57.deja.com:80 (Squid/1.1.22) for client 212.79.194.99 X-MyDeja-Info: XMYDJUIDdmitry6243 Xref: supernews.google.com comp.lang.ada:3767 Date: 2001-01-08T12:06:48+00:00 List-Id: In article <938p3u$omv$1@nnrp1.deja.com>, Robert Dewar wrote: > In article <3A57CD7F.2228BFD5@brighton.ac.uk>, > John English wrote: > > > I prefer to consider parameter passing by copy-and-return > > rather than by-reference as the norm (even though it applies > > to fewer situations in practice) > > But unfortunately, this model is just wrong for by-reference > types. Especially in object oriented programming, where all > tagged types are passed by reference, it is quite wrong to > regard the input as uninitialized, since this does not > correspond with the semantics of the language. OOP does not enforce "tagged types" to be passed by reference. This is Ada 95 specific. Only class-wide types shall be passed by reference (for their size is unknown). Maybe I am wrong, but it seems that RM does not forbid to keep the type tag separated from the value. Does it? Anyway the clear distinction of normal types and class-wide types is an excellent (revolutionaly, IMO) concept. It is pity that Ada 95 didn't use all advantages of the concept. For instance, to have multiple dispatch, or even, all types "tagged"! -- Regards, Dmitry Kazakov Sent via Deja.com http://www.deja.com/