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,7dbba1cd16d32bb8 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!l42g2000hsc.googlegroups.com!not-for-mail From: christoph.grein@eurocopter.com Newsgroups: comp.lang.ada Subject: Re: Ada OOP syntax Date: Wed, 18 Jun 2008 02:58:20 -0700 (PDT) Organization: http://groups.google.com Message-ID: <5f0b81a1-cd8e-4853-9ba4-abd0d28bcd82@l42g2000hsc.googlegroups.com> References: <_9adnb1KYvIrW87VnZ2dnUVZ_vOdnZ2d@comcast.com> <2fde321e-7906-4050-a8c1-26069a8d0d65@j33g2000pri.googlegroups.com> NNTP-Posting-Host: 80.156.44.178 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1213783100 9549 127.0.0.1 (18 Jun 2008 09:58:20 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 18 Jun 2008 09:58:20 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l42g2000hsc.googlegroups.com; posting-host=80.156.44.178; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 webwasher (Webwasher 6.7.0.3295) Xref: g2news1.google.com comp.lang.ada:757 Date: 2008-06-18T02:58:20-07:00 List-Id: > Especially, package types and package subtypes are very interesting. > That syntax seems to be clearer than tagged types. I don't understand > why it was rejected?- Zitierten Text ausblenden - I think because this idea would have turned Ada inside out. In Ada (as it is), packages are just some sort of containers defining a name space (and of course some semantic relations between types and operations defined inside). A package type would have been what a record is now. There would be two different syntaxes for the same semantic thing. Also the word subtype as used in "package subtype" has a fundamentally different meaning. In Ada (as it is), a subtype does not introduce a new type with perhaps some added primitive operations, it only adds a constraint. A package subtype would have been what a derived tagged type is now. A derived type is not compatible with its parent type (as would imply the word subtype in those ideas) - they are convertible only. You might argue that those ideas whould have been more in line with other OO languages, especially the call syntax Obj.Method (which is now available for Ada 2005), but I think Tucker's Ada 95 is a congenial extension of Ichbiah's Ada 83 without assaulting the sytax and sematics. But YMMV.