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: g2news1.google.com!postnews.google.com!l33g2000pri.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Abusing tagged types Date: Mon, 1 Dec 2008 11:54:18 -0800 (PST) Organization: http://groups.google.com 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: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1228161259 19222 127.0.0.1 (1 Dec 2008 19:54:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 1 Dec 2008 19:54:19 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l33g2000pri.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:2846 Date: 2008-12-01T11:54:18-08:00 List-Id: 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. -- Adam