From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!eu.feeder.erje.net!feeder.erje.net!us.feeder.erje.net!xmission!newsswitch.lcs.mit.edu!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Dereferencing and style guides Date: Mon, 30 Sep 2013 08:51:32 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls7.std.com 1380545492 22549 192.74.137.71 (30 Sep 2013 12:51:32 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 30 Sep 2013 12:51:32 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:77U5U+FFwzucNSGZWLgUawWitc0= Xref: news.eternal-september.org comp.lang.ada:17353 Date: 2013-09-30T08:51:32-04:00 List-Id: Natasha Kerensikova 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