comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Dereferencing and style guides
Date: Mon, 30 Sep 2013 08:51:32 -0400
Date: 2013-09-30T08:51:32-04:00	[thread overview]
Message-ID: <wcczjquzd4b.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: slrnl4i6sh.1lme.lithiumcat@sigil.instinctive.eu

Natasha Kerensikova <lithiumcat@gmail.com> writes:

> I think somehow I like to have my statements as context-free as
> possible. So when I see Some_Variable.all I don't have to remember that
> Some_Variable is actually an access value rather than a full-fledged
> object.

I agree with you that dereferencing should be explicit.  Aliasing is
dangerous.  It's good to have a reminder, "There might be other things
pointing at this thing."  If dereference had a decent syntax,
like "^" in Pascal, I would use it always.  And I think the language
should require that.  (A pure functional language is different!)

However, the ".all" syntax is just plain weird.  "All what?"  It makes
no sense to me.  And it's too verbose (should be a single character).
So I don't use it, except when it's required, or in rare cases where I
think it's very important to emphasize the aliasing issue.

There's an option in GNAT to get it to complain when you
leave out ".all".  A pragma-Restriction, I think.

- Bob

  parent reply	other threads:[~2013-09-30 12:51 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 [this message]
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