comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Should weak counted reference be able to be strengthened?
Date: Sat, 22 Nov 2014 09:42:07 +0100
Date: 2014-11-22T09:42:07+01:00	[thread overview]
Message-ID: <cug8ixokl7ie.ih5nt5ekggy1.dlg@40tude.net> (raw)
In-Reply-To: 8kPbw.589930$No4.383019@fx19.iad

On Fri, 21 Nov 2014 15:49:42 -0700, Shark8 wrote:

> On 21-Nov-14 15:39, Randy Brukardt wrote:
>> And anytime you have a bare pointer, you have the possibility of it becoming
>> dangling because they're easy to copy.
> 
> ...Isn't that what Limited is for? To prevent copying?

But access type are only half-types in Ada. You cannot do

   type P is limited access T;

In a better designed type system, the pointer type interface ("is access")
would not be copyable.

In order to get a copyable pointer you would have to derive it from the
interface of copyable objects ("is private").

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


  reply	other threads:[~2014-11-22  8:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-21 11:07 Should weak counted reference be able to be strengthened? Natasha Kerensikova
2014-11-21 13:16 ` Dmitry A. Kazakov
2014-11-21 15:00   ` Natasha Kerensikova
2014-11-21 16:50     ` Dmitry A. Kazakov
2014-11-21 18:24       ` Natasha Kerensikova
2014-11-21 19:36         ` Dmitry A. Kazakov
2014-11-21 22:28           ` Randy Brukardt
2014-11-22  9:57           ` Natasha Kerensikova
2014-11-22 10:19             ` Dmitry A. Kazakov
2014-11-22 10:36               ` Natasha Kerensikova
2014-11-22 11:15                 ` Dmitry A. Kazakov
2014-11-21 22:39       ` Randy Brukardt
2014-11-21 22:49         ` Shark8
2014-11-22  8:42           ` Dmitry A. Kazakov [this message]
2014-11-22  8:42         ` Dmitry A. Kazakov
2014-11-24 22:15           ` Randy Brukardt
2014-11-25  8:36             ` Dmitry A. Kazakov
2014-11-25 21:49               ` Randy Brukardt
2014-11-26  9:28                 ` Dmitry A. Kazakov
2014-11-26 17:51                   ` brbarkstrom
2014-11-26 21:09                   ` 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