comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Access parameters and accessibility
Date: Mon, 15 Dec 2014 22:02:08 +0100
Date: 2014-12-15T22:02:08+01:00	[thread overview]
Message-ID: <ntk96cli9g6s$.1xazvb9mub59w$.dlg@40tude.net> (raw)
In-Reply-To: m6nfv2$vj3$1@speranza.aioe.org

On Mon, 15 Dec 2014 21:23:02 +0100, Michael B. wrote:

> I don't want to use this stuff for my own code. My problem is that I 
> want to understand object orientation in Ada. And this seems to be 
> impossible without a complete understanding of access types in all flavors.

You don't need access types to understand Ada's OO. Furthermore
accessibility checks and information has nothing to do with OO.

> So would you please help me to understand this paragraph?

It says that some information is hanged on the pointer's value implicitly.
The information contains a description of the context where the pointer was
obtained.

By this it violates manifest typing principle. It also does nominal typing.
Both are Ada's type system keystones.

The accessibility information is used on some other context where the
pointer is dereferenced or copied, in order to generate an exception
depending on the relation of this context to the origin context.

The rationale for this is that the pointer *might* become dangled, which in
most practical cases just wrong. The problem with the idea that the
decision is taken according to the pointer contexts, not the context of the
object itself (which would be impossible). So, basically, it is just an
arbitrary exception generator.

Since the thing sometimes generates exception and sometimes does not, it
also violates important OO principles, such as substitutability. Because it
makes the behavior context-dependent.

In short, it is a mess, the only thing you need to know about is how to
avoid it in your program.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2014-12-15 21:02 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15 16:52 Access parameters and accessibility Michael B.
2014-12-15 17:54 ` Dmitry A. Kazakov
2014-12-15 18:48   ` Jeffrey Carter
2014-12-15 20:23     ` Michael B.
2014-12-15 21:02       ` Dmitry A. Kazakov [this message]
2014-12-16  1:10 ` sbelmont700
2014-12-16 13:57   ` Michael B.
2014-12-16 14:12     ` Georg Bauhaus
2014-12-16 21:34     ` sbelmont700
2014-12-17 14:30       ` Michael B.
2014-12-17 15:41         ` sbelmont700
2014-12-18 17:48           ` Michael B.
2014-12-17 16:03         ` Adam Beneschan
2014-12-18 16:07           ` Michael B.
2014-12-16  7:45 ` Randy Brukardt
2014-12-16  8:48   ` Stefan.Lucks
2014-12-16 20:47     ` Randy Brukardt
2014-12-16 21:24       ` Georg Bauhaus
2014-12-16  9:08   ` Natasha Kerensikova
2014-12-16 10:00     ` Dmitry A. Kazakov
2014-12-16 14:57     ` Robert A Duff
2014-12-16 19:46   ` Michael B.
2014-12-16 20:59     ` Randy Brukardt
2014-12-17  7:02       ` Natasha Kerensikova
2014-12-17  8:28         ` Dmitry A. Kazakov
2014-12-17  9:06           ` Natasha Kerensikova
2014-12-17 22:58             ` Randy Brukardt
2014-12-17 22:25         ` Randy Brukardt
2014-12-18  0:47         ` Shark8
2014-12-17  2:02     ` Adam Beneschan
2014-12-17 23:18       ` Randy Brukardt
2014-12-18  0:56         ` Robert A Duff
2014-12-18  1:17           ` Randy Brukardt
2014-12-18  5:29             ` Shark8
2014-12-18 23:12             ` Randy Brukardt
2014-12-18  8:27         ` Dmitry A. Kazakov
2014-12-18 21:20           ` Randy Brukardt
2014-12-19 12:16 ` Michael B.
replies disabled

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