comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Dereferencing and style guides
Date: Fri, 18 Oct 2013 21:36:21 -0500
Date: 2013-10-18T21:36:21-05:00	[thread overview]
Message-ID: <l3sr75$ro4$1@loke.gir.dk> (raw)
In-Reply-To: wccob70twny.fsf@shell01.TheWorld.com

"Robert A Duff" <bobduff@shell01.TheWorld.com> wrote in message 
news:wccob70twny.fsf@shell01.TheWorld.com...
...
> I like the syntax of Pascal: If X is a pointer, then "X" denotes that
> pointer, "X^" denotes the object it points at (all of it!), and "X^.Y"
> denotes the Y component of the object X points at (again, all of that
> component!).  And "X.Y" is illegal.

Wasn't '^' one of the characters that weren't allowed to be used in Ada 83 
because they were not on ancient keypunches? That's probably the reason for 
not using that character.

But I'd be very unhappy if we required it. The fact that it is *not* 
required is very important to giving the illusion that you can index a 
container object directly in Ada 2012 (and modify the elements in place). 
And in general, you don't really want to expose the fact that access types 
are used in reference objects -- the idea is to allow direct modifications 
of the object -- the mechanism used to achieve that should be irrelevant 
(especially to a reader).

Ergo, you never really want to write ".all", because if you have to, you're 
using too many access types in your program. :-)

                                             Randy.



  parent reply	other threads:[~2013-10-19  2:36 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
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 [this message]
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