From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Implicit dereferences rational question
Date: Mon, 19 May 2014 16:51:56 -0500
Date: 2014-05-19T16:51:56-05:00 [thread overview]
Message-ID: <llduds$47j$1@loke.gir.dk> (raw)
In-Reply-To: llb1aa$gth$1@speranza.aioe.org
"Victor Porton" <porton@narod.ru> wrote in message
news:llb1aa$gth$1@speranza.aioe.org...
> Robert A Duff wrote:
>> Victor Porton <porton@narod.ru> writes:
>>
>>> Why implicit dereferences use only access discriminants, not arbitrary
>>> access fields?
>>
>> It helps prevent dangling pointers.
>
> In which way limiting to discriminants may prevent dangling pointers?
Discriminants have a lengthy set of accessibility rules, which turn out to
be exactly what's needed for limiting dangling pointers. In particular, it's
almost never the case that one can make a copy of an access discriminant,
while that's easy for a "arbitrary access field".
Randy.
next prev parent reply other threads:[~2014-05-19 21:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-18 15:24 Implicit dereferences rational question Victor Porton
2014-05-18 17:08 ` Robert A Duff
2014-05-18 19:22 ` Victor Porton
2014-05-19 21:51 ` Randy Brukardt [this message]
2014-05-19 22:44 ` Robert A Duff
2014-05-20 7:29 ` Dmitry A. Kazakov
2014-05-20 21:26 ` Randy Brukardt
2014-05-21 7:36 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox