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 From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Dereferencing and style guides Date: Fri, 18 Oct 2013 21:46:31 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <5249ab97$0$6625$9b4e6d93@newsspool2.arcor-online.net> <23baa71a-6293-452c-89de-16052a198d20@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1382150791 28689 69.95.181.76 (19 Oct 2013 02:46:31 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 19 Oct 2013 02:46:31 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Path: border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder2-2.proxad.net!proxad.net!feeder1-2.proxad.net!feed.ac-versailles.fr!news.ecp.fr!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail X-Original-Bytes: 2550 Xref: number.nntp.dca.giganews.com comp.lang.ada:183666 Date: 2013-10-18T21:46:31-05:00 List-Id: "Robert A Duff" wrote in message news:wcc8uy0t1ec.fsf@shell01.TheWorld.com... ... > By "dereference fails", I assume you're talking about null pointers. > I wasn't so worried about that -- I'm more worried about > aliasing. I'm thinking "X^.Y := ..." is a helpful reminder that > some other pointers might also point to X^. Besides my other reply, I don't buy this anyway. If X is a parameter, it might have other aliases around whether or not it is a pointer (certainly, for anything that could be passed by reference). And even if not a parameter X, can be aliased by foreign code, chapter 13 stuff, etc. The moral is, if you worry about potential aliasing, you're just going to drive yourself nuts (or be seriously oversimplifying). Aliasing in Ada really depends on the type of a name: if it has an elementary type, it's OK to assume that it isn't aliased; otherwise, you have to assume that it can be. Dereferences are irrelevant to that calculation, so I don't see much point in emphasizing them. Randy.