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-12 04:24:07 PST Path: supernews.google.com!sn-xit-03!supernews.com!mtu.ru!news.rosnet.ru!newsfeed.rt.ru!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: Fri, 12 Jan 2001 12:13:50 GMT Organization: Deja.com Message-ID: <93msdr$5pk$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> <93cagm$c1j$1@nnrp1.deja.com> <93l89r$r9m$1@nnrp1.deja.com> NNTP-Posting-Host: 212.197.149.215 X-Article-Creation-Date: Fri Jan 12 12:13:50 2001 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt) X-Http-Proxy: 1.1 x65.deja.com:80 (Squid/1.1.22) for client 212.197.149.215 X-MyDeja-Info: XMYDJUIDdmitry6243 Xref: supernews.google.com comp.lang.ada:3946 Date: 2001-01-12T12:13:50+00:00 List-Id: In article <93l89r$r9m$1@nnrp1.deja.com>, mark_lundquist@my-deja.com wrote: > In article <93cagm$c1j$1@nnrp1.deja.com>, > dmitry6243@my-deja.com wrote: > > Maybe I am wrong, but it seems that RM does not forbid to keep the > > type tag separated from the value. Does it? > > No, it doesn't; it's just that the tag is not "part of" the value > (regardless of where it is "kept"). > > > 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"! > > Interesting idea, but I don't know that I agree it's "a pity" that Ada > didn't do these things. Ada is a practical language. Making scalars, > etc. carry a tag around wouldn't be worth it. It would really foul up > system-level programming and interfacing to other languages. No, you need a tag only in a class-wide. 90% of all code does not involve class-wide values, references or pointers. I do not think that Integer's + and - should be dispaching (:-)) even if Integer is "tagged". 'Value and 'Image are much better candidates. In any case if the tag is kept separately you can interface to all other languages until you make dispatchig calls. To have it safe, there should be a way to say which parameter of a primitive operation is dispatching and which is not. If all parameters are non-dispatching, you have a normal subroutine suitable to interface even with FORTRAN-IV. > I don't see a whole lot of value in doing classwide programming on > integers or arrays anyway (with plenty of opportunity for obscure > code). Can't you get the same effect by declaring a tagged container, > then deriving from that? What about implementation of the attributes like 'Image, 'Read, 'Output etc. as dispatching subroutines? I made no detailed investigation, but I think that many currently hard-coded things could be then expressed in the terms of the language. -- Regards, Dmitry Kazakov Sent via Deja.com http://www.deja.com/