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-Thread: 103376,f3687114209e3c2c X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!news2.euro.net!amsnews11.chello.com!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Abusing tagged types Date: Mon, 1 Dec 2008 22:04:57 -0600 Organization: Jacob Sparre Andersen Message-ID: References: <87y6z4cefp.fsf@willow.rfc1149.net> <7cca32f3-0815-4564-b83a-d19a0e59b8ab@l42g2000yqe.googlegroups.com> <256b827b-f245-43af-bf17-b663c84041ba@g38g2000yqd.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1228190730 28618 69.95.181.76 (2 Dec 2008 04:05:30 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 2 Dec 2008 04:05:30 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Original Xref: g2news2.google.com comp.lang.ada:3820 Date: 2008-12-01T22:04:57-06:00 List-Id: "Adam Beneschan" wrote in message news:f31c3700-731a-495e-b2da-7a909ef9c5db@l33g2000pri.googlegroups.com... > On Nov 28, 6:08 am, Ludovic Brenta wrote: >> Maciej Sobczakwrote: >> >> > By the way - what is the rationale for allowing Obj.Operation only for >> > tagged types and not for all types? "Ada 2005 Rationale" does not seem >> > to explain this. >> >> Actually it does but I find the explanation a bit cryptic for untagged >> types other than access types: >> >> "Other variations on the rules for the use of the notation were >> considered. One was that the mechanism should apply to untagged types >> as well but this was rejected on the grounds that it might add to >> rather than reduce confusion in some cases. In any event, untagged >> types do not have class wide types so they are intrinsically simpler. >> It would have been particularly confusing to permit the notation to >> apply to access types especially an access type A referring to a >> tagged type T. If the access type and the tagged type both had the >> same or similar operations Op then ambiguities or errors could easily >> arise." >> >> Maybe the AI has more details. > > From the beginning of AI-252: "Note: We considered generalizing this > to allow non-tagged types to use this shorthand, but this becomes > complex when the type is an access type, since both the access type > itself, and its designated type must be considered. Furthermore, the > benefit is lower since there is no issue of class-wide operations for > non-tagged types, so all the "interesting" operations are all from a > single package." > > I don't see much other discussion in the AI about this issue; perhaps > all the discussion about it was done elsewhere before AI-252 was > opened. I think most of the discussion on this came at the ARG meetings. (The text in the AI was the one-paragraph summary of the meeting conclusions, written by someone [me] that had lots of other things to do.) My recollection was that there was a problem with dealing with the automatic dereference and 'Access rules when the type could be an access type. It seemed that only one (having those rules) or the other (having access types) worked, and we choose the more useful semantics by limiting it to only tagged types. Perhaps there is more detail in the meeting minutes (or maybe it is just lost). Randy.