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-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newspeer.monmouth.com!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Ada 95 and Class attribute for none-tagged incomplete type Date: Sat, 15 Aug 2009 10:33:43 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <8442c52d-805f-4ca8-95ab-b4c8e949d7cd@k6g2000yqn.googlegroups.com> <17b5de2e-74df-414a-b214-677344dc697e@x25g2000prf.googlegroups.com> <4a83cc73$0$6272$4f793bc4@news.tdc.fi> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1250346824 2004 192.74.137.71 (15 Aug 2009 14:33:44 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sat, 15 Aug 2009 14:33:44 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:9o2Ik8r6MubVrE5Y1M8VUI3OwN4= Xref: g2news2.google.com comp.lang.ada:7817 Date: 2009-08-15T10:33:43-04:00 List-Id: "Randy Brukardt" writes: > "Robert A Duff" wrote in message > news:wcc3a7uusn8.fsf@shell01.TheWorld.com... >> "Randy Brukardt" writes: >> >>>...All this special rule eliminates is the need to declare >>> an incomplete type in this one unusual case (the private type in cases >>> like >>> this is best declared as tagged, so this shouldn't happen very often). >>> Seems >>> like a pile of work for an implementation and for the language just to >>> eliminate one line in a private part. >> >> The problem is that declaring that incomplete type is illegal. >> Eliminating the need for one _illegal_ line isn't such a bad thing. ;-) > > Why is it illegal? Doesn't seem like it ought to be on the face of it. Umm... Because the RM says so? 7.3(4). So why does the RM say so? Because Jean Ichbiah wanted it that way, I guess, and nobody thought it desirable or important enough to change during Ada 9X or Ada 0X projects. > Apparently, you haven't thought to hard about the semantics of limited > views. :-) *Every* private type that can be used in a limited view has (at > least) three views (the incomplete view from the limited view being the > third). Good point, although at the time the rule we're talking about (allowing Private_Type'Class before the full type) was invented, there were no such things as limited views. > I believe we (Tucker and I? On the ARG list? I don't remember) We discussed it in a telephone meeting. No doubt also on ARG list. >...were > discussing eliminating some of the restrictions on the declaration and > completion of incomplete types in order to make the use of "incomplete > instances" or "intgregated packages" or whatever we end up with more useful. > (Many of the "derivation" problems go away if you can simply declare an > incomplete type ahead of time to introduce the proper name for the type.) Yes, I think that's a good direction to go, if we can make it work. A language design goal should be: Never require the use of pointers, except when reference semantics is desired. Ada violates this principle in several ways, and removing one of them one be a good thing. (C violates this principle even more, and Java more still.) - Bob