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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!reality.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Why can't Ada use dot notation on private types? Date: Mon, 6 Feb 2017 13:44:37 -0600 Organization: JSA Research & Innovation Message-ID: References: NNTP-Posting-Host: rrsoftware.com X-Trace: franka.jacob-sparre.dk 1486410278 19362 24.196.82.226 (6 Feb 2017 19:44:38 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 6 Feb 2017 19:44:38 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:33265 Date: 2017-02-06T13:44:37-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:o77gh4$6vf$1@gioia.aioe.org... > On 2017-02-05 15:17, Lucretia wrote: > >> A lot of people dislike the fact that you cannot use dot notation on >> a tagged type if it's private. Is there a reason for this? Surely the >> compiler knows it's tagged when it looks it up? > > I don't know why it is tied to certain types. That was the original idea. But we ran into semantic problems with elementary types (and private types completed with elementary types), so we ended up restricting it to tagged only. (The usual reason applied here: it's better to get a limited version of a feature right -- it can be expanded later if necessary -- that to get a general version of a feature wrong -- because then we're stuck with the mistakes forever.) The problems mainly come from the possibility of implicit .all and 'Access. I personally think we could have done without the later, but the former is traditional Ada semantics which would be weird to not support in this prefix form. Randy.