comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Why can't Ada use dot notation on private types?
Date: Mon, 6 Feb 2017 13:44:37 -0600
Date: 2017-02-06T13:44:37-06:00	[thread overview]
Message-ID: <o7ajn5$it2$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: o77gh4$6vf$1@gioia.aioe.org

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> 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.



  reply	other threads:[~2017-02-06 19:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-05 14:17 Why can't Ada use dot notation on private types? Lucretia
2017-02-05 15:31 ` Dmitry A. Kazakov
2017-02-06 19:44   ` Randy Brukardt [this message]
2017-02-06 20:27     ` Dmitry A. Kazakov
2017-02-08 23:26       ` Randy Brukardt
2017-02-09  8:47         ` Dmitry A. Kazakov
2017-02-06 19:40 ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox