comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Dereferencing and style guides
Date: Mon, 30 Sep 2013 09:13:59 +0200
Date: 2013-09-30T09:13:59+02:00	[thread overview]
Message-ID: <zq3zflp1ohx6$.im7ueufmmzr9.dlg@40tude.net> (raw)
In-Reply-To: slrnl4i6sh.1lme.lithiumcat@sigil.instinctive.eu

On Mon, 30 Sep 2013 06:35:09 +0000 (UTC), Natasha Kerensikova wrote:

> So what do you think about the topic?
> Are there other people here favoring non-mandatory .all?
> Have I missed some guidelines and rationals discussion the question?

I don't believe many would agree, but anyway. From my point of view a
referential type (such as access type) represents a subtype of the target
type. Therefore there should be no .all or any other explicit dereferencing
operation, because this is not the parent's type operation. For the same
reason := should have mean deep assignment not the shallow one as in Ada.
For shallow assignment there should have been another operation here, or
overloaded :=, e.g.

   type T is ...;
   type T_Ptr is access T;

   X, Y := T_Ptr;
begin
   X := Y; -- Deep copy
   X := Y'Access; -- Shallow copy

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

  reply	other threads:[~2013-09-30  7:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-30  6:35 Dereferencing and style guides Natasha Kerensikova
2013-09-30  7:13 ` Dmitry A. Kazakov [this message]
2013-09-30 12:51 ` Robert A Duff
2013-09-30 16:49   ` Georg Bauhaus
2013-09-30 18:18     ` Jeffrey Carter
2013-10-03 19:20     ` Robert A Duff
2013-10-04 13:22       ` Georg Bauhaus
2013-10-04 13:25         ` Georg Bauhaus
2013-10-07 16:10       ` Eryndlia Mavourneen
2013-10-08  0:48         ` Robert A Duff
2013-10-10  7:35           ` Stefan.Lucks
2013-10-10 14:48             ` Adam Beneschan
2013-10-10 22:49               ` Robert A Duff
2013-10-11  8:07                 ` Bill Findlay
2013-10-11 12:52                   ` Robert A Duff
2013-10-11 13:02                     ` G.B.
2013-10-11 13:19                     ` Bill Findlay
2013-10-19  2:40                     ` Randy Brukardt
2013-10-19  2:46                     ` Randy Brukardt
2013-10-19  2:36           ` Randy Brukardt
2013-09-30 13:53 ` Eryndlia Mavourneen
replies disabled

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